[Koha-bugs] [Bug 16530] Add a circ sidebar navigation menu

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16530

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #51777|0   |1
is obsolete||

--- Comment #10 from Aleisha Amohia  ---
Created attachment 53008
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53008=edit
Bug 16530: Adding a circ sidebar navigation menu

Edit: Fast cataloging link should now show on all pages, removed offline
circulation links
Note: This patch does not create the syspref to activate or deactivate the
sidebar, will add that in another patch

This adds a sidebar to
circ/branchoverdues.tt
circ/circulation.tt (I also fixed up some of the indentation in this file to
make it easier to see where the divs started and ended)
circ/renew.tt
circ/returns.tt
circ/selectbranchprinter.tt
circ/transferstoreceive.tt
circ/view_holdsqueue.tt
circ/waitingreserves.tt
offline_circ/list.tt
offline_circ/process_koc.tt

To test:
1) Go to all of the above pages and confirm the sidebar menu shows up and fast
cataloging link shows up
2) Trigger any error messages you can possibly think of (i.e. on renew.pl:
barcode does not exist). Confirm that this does not mess up the layout of the
page
3) Go to a user account page, Check out tab. (Since this is a
circ/circulation.pl page). Ensure the circ nav sidebar doesn't show up (confirm
it looks as it usually does)
4) Decide if you like how things look or not!

Sponsored-by: Catalyst IT

Signed-off-by: Jan Kissig 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 9259] batch delete marc batches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9259

Aleisha Amohia  changed:

   What|Removed |Added

  Attachment #49746|0   |1
is obsolete||

--- Comment #8 from Aleisha Amohia  ---
Created attachment 53007
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53007=edit
Bug 9259: Ability to delete a staged file once it has been cleaned

To test:
1) Go to Tools -> Staged MARC Management and clean a file. If you have no files
to clean, go to 'Stage MARC for import' and upload one to clean following the
necessary steps.
2) Confirm that once the file has been cleaned, the Action column now shows a
Delete button. Confirm this button only shows for cleaned files.
3) Click the Delete button.
4) Confirm that clicking Cancel exits the pop-up message and does not delete
the file.
5) Confirm that clicking OK refreshes the list of staged records and the one
you just deleted is no longer on it (has been deleted). You can confirm this by
checking for the file in mysql (SELECT * FROM import_batches WHERE
import_batch_id = X;)
6) Run prove -v t/db_dependent/ImportBatch.t (have written unit tests for
CleanBatch and DeleteBatch)

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea 
Catalyst sign off, so needs another one but YAY this is great.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 9259] batch delete marc batches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9259

Aleisha Amohia  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11000] koha-restore not working: Koha username error

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11000

Karam Qubsi  changed:

   What|Removed |Added

Version|16.11   |16.05

--- Comment #3 from Karam Qubsi  ---
Update : Tested on Debian 8.5 . Koha 16.05.01 (packages )  there is no problem
, it is just  ubuntu problem .

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16837] New: koha-start-zebra should start zebra-indexer too

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16837

Bug ID: 16837
   Summary: koha-start-zebra should start zebra-indexer too
 Change sponsored?: ---
   Product: Koha
   Version: master
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P5 - low
 Component: Command-line Utilities
  Assignee: gmcha...@gmail.com
  Reporter: m...@kohaaloha.com
QA Contact: testo...@bugs.koha-community.org
CC: ro...@catalyst.net.nz

it would be useful if koha-start-zebra started the zebra-indexer too

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16812] Revise JS script for z3950_search.tts and remove onclick events

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16812

Héctor Eduardo Castro Avalos  changed:

   What|Removed |Added

  Attachment #53005|0   |1
is obsolete||

--- Comment #9 from Héctor Eduardo Castro Avalos  ---
Created attachment 53006
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53006=edit
Bug 16812: Revise JS script for z3950_search.tts and remove onclick events

Modify JS script to all templates for z3950_search.tt and reduce the
redundant code

This patch propose:
-z3950_auth_search.tt has various onclick events used in links.
 Also fix: acqui/z3950_search.tt and cataloguing/z3950_search.tt
-Trigger onclick events via JQuery .on()
-Make a separate .js and .inc file
-Reduce the number of line and redundant code
-Also add Font Awesome Icons to "Select/Clear all" and "Clear search form"
links

To test:
1-Apply bug 16600 on top
2-Apply patch
3-Go to Authorities > click New from Z39.50
4-Fill some fields and click in "Clear search form" link
5-Search under "Dalton" or another author that launch too many headings
6-Clic in some heading and notice the dialog open, test: "Preview MARC",
ISBD (when showed), "Import" and close the dialog "X". Use the "Import" from
table too.
7-Use the "next/previous page" button, change "Go to page" to number in and
  out of the range presented, also test whit a letter, etc.

Go to Cataloging > New from Z39.50/SRU
Repeat steps 3 to 6. But this time with bib records.

Go to Adquisition > Open or Create a basket and choose to "Add to basket"
button. A modal appear, chose the option "Order from external source"
Repeat steps 3 to 6. But this thime with bib records.

NOTE: The icon trash for "Clear search form" has been selected according
with module "Advanced search" there is an icon trash with link "Clear fields"
that has the same fuctionality.
For some reason the image loading-small.gif does not charge all times when
the code is get out of the template. (Fixed with this new patch)
DataTable it is specific for each template

Sponsored-by: Universidad de El Salvador

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16812] Revise JS script for z3950_search.tts and remove onclick events

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16812

Héctor Eduardo Castro Avalos  changed:

   What|Removed |Added

  Attachment #52886|0   |1
is obsolete||

--- Comment #8 from Héctor Eduardo Castro Avalos  ---
Created attachment 53005
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53005=edit
Bug 16812: Revise JS script for z3950_search.tts and remove onclick events

Modify JS script to all templates for z3950_search.tt and reduce the
redundant code

This patch propose:
-z3950_auth_search.tt has various onclick events used in links.
 Also fix: acqui/z3950_search.tt and cataloguing/z3950_search.tt
-Trigger onclick events via JQuery .on()
-Make a separate .js and .inc file
-Reduce the number of line and redundant code
-Also add Font Awesome Icons to "Select/Clear all" and "Clear search form"
links

To test:
1-Apply bug 16600 on top
2-Apply patch
3-Go to Authorities > click New from Z39.50
4-Fill some fields and click in "Clear search form" link
5-Search under "Dalton" or another author that launch too many headings
6-Clic in some heading and notice the dialog open, test: "Preview MARC",
ISBD (when showed), "Import" and close the dialog "X". Use the "Import" from
table too.
7-Use the "next/previous page" button, change "Go to page" to number in and
  out of the range presented, also test whit a letter, etc.

Go to Cataloging > New from Z39.50/SRU
Repeat steps 3 to 6. But this time with bib records.

Go to Adquisition > Open or Create a basket and choose to "Add to basket"
button. A modal appear, chose the option "Order from external source"
Repeat steps 3 to 6. But this thime with bib records.

NOTE: The icon trash for "Clear search form" has been selected according
with module "Advanced search" there is an icon trash with link "Clear fields"
that has the same fuctionality.
For some reason the image loading-small.gif does not charge all times when
the code is get out of the template. (Fixed with this new patch)
DataTable it is specific for each template

Sponsored-by: Universidad de El Salvador

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 12303] use public reports to generate a new items widget

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12303

Amalendu  changed:

   What|Removed |Added

 Orig. Est.|0.00|33.00
 CC||das.anamika...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16794] Revise layout for Admistration > Patron categories

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16794

Héctor Eduardo Castro Avalos  changed:

   What|Removed |Added

  Attachment #52703|0   |1
is obsolete||
  Attachment #52856|0   |1
is obsolete||
  Attachment #53002|0   |1
is obsolete||

--- Comment #10 from Héctor Eduardo Castro Avalos  
---
Created attachment 53003
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53003=edit
Bug 16794: Revise layout for Admistration > Patron categories

Add Bootstrap buttons and Font Awesome Icons to "Delete" and "Edit" links

To test
- Go to Administration -> Patron categories
 - Confirm that two button appear instead of links for "Edit" and "Delete"
 - Edit an existing category and confirm that works as expected
 - Delete a category and confirm that works properly.

Patch fix it according with QA comment 3
Fix copy and paste according with QA comment 6
Fix column "Default privacy" to be sorted again according with comment 8
Patch set squashed

Buttons appear now as requested in comment #3 (2 buttons, no action menu)
Signed-off-by: Marc Véron 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16794] Revise layout for Admistration > Patron categories

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16794

--- Comment #9 from Héctor Eduardo Castro Avalos  ---
Created attachment 53002
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53002=edit
Bug 16794: (follow up)Make column "Default privacy" could be sorted again

Fix column "Default privacy" to be sorted again according with comment 8

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874

Nick Clemens  changed:

   What|Removed |Added

 Status|In Discussion   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16794] Revise layout for Admistration > Patron categories

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16794

Héctor Eduardo Castro Avalos  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874

--- Comment #25 from Nick Clemens  ---
Created attachment 53001
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53001=edit
Bug 14874 (QA Followup) Add dateofbirth column to checkout search results  
  Reintroduce $termsearchfieldstype for resetting search type for non-date
terms

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 8030] Change pickup location of a hold from patron record

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8030

Nick Clemens  changed:

   What|Removed |Added

  Change sponsored?|--- |Sponsored
 CC||n...@bywatersolutions.com
   Assignee|koha-b...@lists.koha-commun |n...@bywatersolutions.com
   |ity.org |

--- Comment #2 from Nick Clemens  ---
Work to be done:
1) Modify the pickup location on holds table to be a pulldown of pickup
locations
2) Add new svc/rest script to update hold pickup locations
3) Modify javascript such that change the pickup location first asks for
confirmation,
if change is confirmed, pickup location will be updated via ajax process
if change is canceled, previous pickup location will be set for pulldown

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874

Nick Clemens  changed:

   What|Removed |Added

  Attachment #51972|0   |1
is obsolete||

--- Comment #23 from Nick Clemens  ---
Created attachment 52999
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52999=edit
Bug 14874 - (followup) Refactor t/db_dependent/Utils/Datatables_Members.t to
use TestBuilder

To test:
1 - Apply other patches (not this one)
2 - Prove t/db_dependent/Utils/Datatables_Members.t
3 - SHould pass
4 - Apply this patch
5 - prove t/db_dependent/Utils/Datatables_Members.t
6 - All tests should continue to pass

Signed-off-by: Eleftheria 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874

Nick Clemens  changed:

   What|Removed |Added

  Attachment #51971|0   |1
is obsolete||

--- Comment #22 from Nick Clemens  ---
Created attachment 52998
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52998=edit
Bug 14874 - Add ability to search for patrons by date of birth from checkout
and patron quick searches

This patch alters C4::Utils::DataTables::Members::search to autodetect
if the searchmember parameter is a date and search by DOB if so

To test:
1 - Apply patch
2 - Search for members by DOB formatted as per dateformat syspref or
mysql format
3 - Results should be returned as expected
4 - Search combined with other terms, results should be returned as
expected
5 - Search for patrons without using dates, results should be as
expected
6 - Search using search fields 'Date of birth' from expanded menu on
patron search - results should be returned as before (Note dying on
incorrect format is an existing bug)
7 - prove t/db_dependent/Utils/Datatables_Members.t

Sponsored by Carnegie Stout Library (https://www.dubuque.lib.ia.us/)

Signed-off-by: Eleftheria 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14874] Add ability to search for patrons by date of birth from checkout and patron quick searches

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14874

Nick Clemens  changed:

   What|Removed |Added

  Attachment #52079|0   |1
is obsolete||

--- Comment #24 from Nick Clemens  ---
Created attachment 53000
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53000=edit
Bug 14874: Tidy previous patch

remove debug statements
remove useless add of new var $termsearchfieldstype
rename term_is_dt with term_dt (term_is_dt is not a boolean but a dt)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Lari Taskula  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=16815

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16815] API routes to list, create, update, delete holds need permissions

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16815

Lari Taskula  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=14868

--- Comment #1 from Lari Taskula  ---
This issue is fixed in Bug 14868, however it does not directly duplicate this
bug since Bug 14868 (Swagger2-driven permission checking) is last of three
changes that modify the Swagger-specification aiming towards more split
specification including the introduction of permissions in Path-object. Here
are short descriptions for the three Bugs:

1. Bug 16212 adds a "minifier"-script to Swagger that fixes problems the
current way of splitting swagger.json in master has caused; the problem is that
splitting the "definitions" to $ref: definitions/index.json is not allowed
(same with Paths-object) in Swagger. If we use a script to resolve the
references in swagger.json, it becomes valid. You can see this problem if you
try to validate our master Swagger specification with online.swagger.io
validator.
2. Bug 16699 (depends on 16212) splits swagger.json further than what has
already been done, and uses the minifier to make this type of split allowed.
3. Bug 14868 fixes the issue reported in this bug, but is dependant on Bug
16699.

It would be cool if someone took a look at them. I'm adding it as See Also. :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16832] Patrons categories fails due the Switzerland number format

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16832

--- Comment #2 from Héctor Eduardo Castro Avalos  ---
Hi Marc

I got this error in my Debian Jessie but in Wheezy I cannot reproduce the
error.
Maybe, I messed up something in my Jessie installation.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15128] Add ability to limit the number of open purchase suggestions a patron can make

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15128

Nick Clemens  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15128] Add ability to limit the number of open purchase suggestions a patron can make

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15128

--- Comment #30 from Nick Clemens  ---
Created attachment 52997
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52997=edit
Bug 15128 (QA Followup) Display all purchase suggestions whether or not
suggestion was added Correct enforcement of 0 limit

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52953|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

--- Comment #18 from Johanna Räisä  ---
Created attachment 52993
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52993=edit
[SIGNED-OFF] Bug 14868: Give users possibility to request their own object

If the user has no required permissions, but attempts to access his own object,
allow this request in case "x-koha-permission" has defined "allow-owner": "1".

As an example, the following resource can be accessed if user has
borrowers-flag
or if he is making the request to his own borrowernumber (in path or body):

"/patrons/{borrowernumber}": {
  ..
  "x-koha-permission": {
"allow-owner": "1",
"permissions": {
  "borrowers": "1"
}
  }
}

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

--- Comment #19 from Johanna Räisä  ---
Created attachment 52994
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52994=edit
[SIGNED-OFF] Bug 14868: Use x-koha-permission in current routes

Adds missing permission checking to holds. Adds 6 tests to patrons.t, adds 30
tests to holds.t.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

--- Comment #20 from Johanna Räisä  ---
Created attachment 52995
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52995=edit
[SIGNED-OFF] Bug 14868: Rename 'x-koha-permission' to 'x-koha-authorization'

Since we need to be able to define other authorization options than simply Koha
permissions, for example "allow-owner", we should rename x-koha-permission into
x-koha-authorization to better describe the object.

This patch simply renames all occurences of x-koha-permission into
x-koha-authorization.

The new specification for authorization:
"/patrons/{borrowernumber}": {
  ..
  "x-koha-authorization": {
 "allow-owner": "1",
 "pemissions": {
   "borrowers": "1"
 }
  }
}

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52967|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52966|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52965|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52969|0   |1
is obsolete||

--- Comment #22 from Johanna Räisä  ---
Created attachment 52982
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52982=edit
[SIGNED-OFF] Bug 16212: Add script minifySwagger.pl

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52964|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52971|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52973|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52952|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52995|0   |1
is obsolete||

--- Comment #21 from Johanna Räisä  ---
Created attachment 52996
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52996=edit
[SIGNED-OFF] Bug 14868: Rename 'x-koha-permission' to 'x-koha-authorization'

Since we need to be able to define other authorization options than simply Koha
permissions, for example "allow-owner", we should rename x-koha-permission into
x-koha-authorization to better describe the object.

This patch simply renames all occurences of x-koha-permission into
x-koha-authorization.

The new specification for authorization:
"/patrons/{borrowernumber}": {
  ..
  "x-koha-authorization": {
 "allow-owner": "1",
 "pemissions": {
   "borrowers": "1"
 }
  }
}

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52980|0   |1
is obsolete||

--- Comment #31 from Johanna Räisä  ---
Created attachment 52991
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52991=edit
[SIGNED-OFF] Bug 16699: Move Swagger-related files to api/v1/swagger

This patch separates Swagger-specifications and the minifySwagger.pl from other
api-files by moving specifications & minifier into api/v1/swagger.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52981|0   |1
is obsolete||

--- Comment #17 from Johanna Räisä  ---
Created attachment 52992
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52992=edit
[SIGNED-OFF] Bug 14868: Swagger2-driven Permission checking

A hasty downgrade from 13920, utilizing new features implemented by the
Mojolicious::Plugin::Swagger2-author, to make it possible to implement more
complex authentication/authorization scenarios with the Plugin.

Define 'x-koha-permission' for the Swagger2 Operation Object, to automatically
authorize against the required permissions.

This way we immediately tell the API consumer in the Swagger2-definition, which
permissions are needed to access defined resources.
Also we don't need to maintain permissions in multiple locations and we can
build
a smart testing framework to help a lot in creating tests for the new REST API.

Rebase notes from 2015-09-22 to 2016-06-20:
- In patrons.t, change expected HTTP 403 to 401 when accessing the endpoint
  without authentication (401 = not authenticated, 403 = authenticated, but no
  permission).

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52979|0   |1
is obsolete||

--- Comment #30 from Johanna Räisä  ---
Created attachment 52990
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52990=edit
[SIGNED-OFF] Bug 16699: Reference new x-primitives in currently defined objects

Since we have defined some basic x-primitives in x-primitives.json, we can now
start to reuse them in our currently defined objects.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate your Swagger specifications
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52978|0   |1
is obsolete||

--- Comment #29 from Johanna Räisä  ---
Created attachment 52989
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52989=edit
[SIGNED-OFF] Bug 16699: Support multiple types in primitive definitions

Currently it is not possible to define multiple types for primitive definitions
in /definitions/*. If you try to use the following
"firstname": {
  "type": ["string", "null"],
  "description": "patron's first name"
}
in definitions.json, online.swagger.io validator will not validate it:
{"messages":["attribute definitions.firstname.type is not of type `string`"]}

One way to get around this issue is to extend definitions with custom
"x-primitives" object, where we will define all reusable primitive definitions.

To test:
1. Add the "firstname" example above to definitions.json
2. Run minifySwagger.pl
3. Validate your specification
4. Observe that error with description mentioned above is given
5. Apply patch
6. Repeat step 2 and 3
7. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52976|0   |1
is obsolete||

--- Comment #28 from Johanna Räisä  ---
Created attachment 52988
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52988=edit
[SIGNED-OFF] Bug 16699: Fix mixed-up indentation from 2-4 spaces to 2 spaces

These definitions had indentation of 4 spaces, while rest of the specification
uses 2 spaces. This patch simply maintains the consistency in indentations and
provides no other modifications to code.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52974|0   |1
is obsolete||

--- Comment #26 from Johanna Räisä  ---
Created attachment 52986
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52986=edit
[SIGNED-OFF] Bug 16699: Split parameters and paths in Swagger

Parameters and paths should be split in our Swagger specification, because
otherwise swagger.json would become messy with all the paths and their
further specification in the same file. Also parameters should be split
for the same reason.

Instead of using index.json for definitions, parameters and paths, we define
new files "definitions.json", "parameters.json" and "paths.json" in order to
simplify the references. If we kept using index.json and try to reference
"/definitions/error.json" from "/paths/holds.json", reference would be
"../definitions/index.json#/error" instead of now simplified version,
"../definitions.json#/error".

Here is the proposed structure:

.
├── swagger.json
├── definitions.json
├── paths.json
├── parameters.json
├── definitions
│   └── error.json
│   └── patron.json
├── parameters
│   └── patron.json
├── paths
│   └── patrons.json
├── minifySwagger.pl
└── swagger.min.js

The swagger.json paths, definitions and parameters will look as follows:
...
  "paths": {
"$ref": "paths.json"
  },
  "definitions": {
"$ref": "definitions.json"
  },
  "parameters": {
"$ref": "parameters.json"
  }
...

A problem with splitting specification into multiple files directly from
swagger.json (e.g. "paths": { "$ref": "paths.json" }) is that it is not
following the Swagger specification and an error will be thrown by the
Swagger-UI default validator (online.swagger.io/validator).

To overcome this problem, we use the minifySwagger.pl script from Buug 16212.
This allows the developers to work with the structure introduced in this patch
thus allowing developers to split the specification nicely, and still have a
valid Swagger specification in the minified swagger.min.json.

To test:
-2: Apply the minifier-patch in Buug 16212.
-1: Make sure you can validate your specification with Swagger2 validator at
online.swagger.io/validator/debug?url=url_to_swaggerjson, or install it
locally from https://github.com/swagger-api/validator-badge.

1. Don't apply this patch yet, but first validate swagger.json
   with swagger.io-validator (or your local version, if you installed it)
2. Observe that validation errors are given
3. Run minifySwagger.pl
4. Validate swagger.min.json with the validator you used in step 1
5. Observe that validation passes and we overcame the invalid specification
   problem in swagger.min.json
6. Apply this patch
7. Run minifySwagger.pl
8. Repeat step 4
9. Observe that validation passes with new structure
10. Run REST tests at t/db_dependents/api/v1

(11. Study the new structure of our Swagger specifications :))

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52975|0   |1
is obsolete||

--- Comment #27 from Johanna Räisä  ---
Created attachment 52987
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52987=edit
[SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for reusability

The borrowernumber as a query parameter should be defined in parameters.json
in order to allow its reusability.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate swagger.min.json in online.swagger.io/validator/debug?url=url_to+
   _your_swagger_min_json or your local swagger-api/validator-badge validator
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

--- Comment #25 from Johanna Räisä  ---
Created attachment 52985
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52985=edit
[SIGNED-OFF] Bug 16212: Automatically minify swagger.json

This patch adds automatic minification of swagger.json. Since startup
subroutine
is executed on each call to REST API, we need to be careful to not do useless
computation by minificating swagger.json when not required. Therefore, we need
some algorithm to determine whether minification is needed. In this patch,
minification is executed in two cases:
1. swagger.min.json does not exist
2. any of the specification files is modified more recently than
   swagger.min.json

Includes tests.

This feature requires Apache user to have write permissions to
swagger.min.json,
otherwise we cannot minify the specification automatically. Another solution is
to run the minifySwagger.pl manually after each modification or create a daemon
that listens to file modifications via "inotify" and executes minification when
needed.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52972|0   |1
is obsolete||

--- Comment #24 from Johanna Räisä  ---
Created attachment 52984
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52984=edit
[SIGNED-OFF] Bug 16212: Use swagger.min.json insted of swagger.json

Our current approach with splitting the Swagger specification brings problems.
For example, in swagger.json, if we split the whole "definitions" object with
$ref, validations will fail with online.swagger.io validator.

(See http://online.swagger.io/validator/debug?url=url_to_your_swagger_json)

The problem also occurs with "paths" (Paths Object), because simply $ref to all
paths for example in /paths/index.json does not meet the Swagger2
specification.

The problem is solved by using the minification script and the minified version
of swagger.json after which the swagger.min.json is valid Swagger2
specification,
because the minifier resolves the problematic $refs of swagger.json file in the
minified version.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52970|0   |1
is obsolete||

--- Comment #23 from Johanna Räisä  ---
Created attachment 52983
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52983=edit
[SIGNED-OFF] Bug 16212: Move from misc/devel to api/v1

Move minifySwagger.pl from misc/devel to api/v1 since it is directly related
to swagger.json and the usage is simplified when it is in the same location
with
swagger.json.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

--- Comment #16 from Johanna Räisä  ---
Created attachment 52981
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52981=edit
[SIGNED-OFF] Bug 14868: Swagger2-driven Permission checking

A hasty downgrade from 13920, utilizing new features implemented by the
Mojolicious::Plugin::Swagger2-author, to make it possible to implement more
complex authentication/authorization scenarios with the Plugin.

Define 'x-koha-permission' for the Swagger2 Operation Object, to automatically
authorize against the required permissions.

This way we immediately tell the API consumer in the Swagger2-definition, which
permissions are needed to access defined resources.
Also we don't need to maintain permissions in multiple locations and we can
build
a smart testing framework to help a lot in creating tests for the new REST API.

Rebase notes from 2015-09-22 to 2016-06-20:
- In patrons.t, change expected HTTP 403 to 401 when accessing the endpoint
  without authentication (401 = not authenticated, 403 = authenticated, but no
  permission).

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52962|0   |1
is obsolete||

--- Comment #25 from Johanna Räisä  ---
Created attachment 52980
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52980=edit
[SIGNED-OFF] Bug 16699: Move Swagger-related files to api/v1/swagger

This patch separates Swagger-specifications and the minifySwagger.pl from other
api-files by moving specifications & minifier into api/v1/swagger.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52961|0   |1
is obsolete||

--- Comment #24 from Johanna Räisä  ---
Created attachment 52979
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52979=edit
[SIGNED-OFF] Bug 16699: Reference new x-primitives in currently defined objects

Since we have defined some basic x-primitives in x-primitives.json, we can now
start to reuse them in our currently defined objects.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate your Swagger specifications
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15853] Add author and link columns to opac course reserves table

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15853

--- Comment #4 from Nick Clemens  ---
(In reply to jmbroust from comment #2)
> We tried to apply the patch on sandboxes 2 and 6 but it failed each time
> with no logs (blocked on web installer twice). So maybe there is a problem.
Rebased (it was my patch on another bug that caused the conflict :-) )

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52960|0   |1
is obsolete||

--- Comment #23 from Johanna Räisä  ---
Created attachment 52978
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52978=edit
[SIGNED-OFF] Bug 16699: Support multiple types in primitive definitions

Currently it is not possible to define multiple types for primitive definitions
in /definitions/*. If you try to use the following
"firstname": {
  "type": ["string", "null"],
  "description": "patron's first name"
}
in definitions.json, online.swagger.io validator will not validate it:
{"messages":["attribute definitions.firstname.type is not of type `string`"]}

One way to get around this issue is to extend definitions with custom
"x-primitives" object, where we will define all reusable primitive definitions.

To test:
1. Add the "firstname" example above to definitions.json
2. Run minifySwagger.pl
3. Validate your specification
4. Observe that error with description mentioned above is given
5. Apply patch
6. Repeat step 2 and 3
7. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15853] Add author and link columns to opac course reserves table

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15853

Nick Clemens  changed:

   What|Removed |Added

  Attachment #52023|0   |1
is obsolete||

--- Comment #3 from Nick Clemens  ---
Created attachment 52977
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52977=edit
Bug 15853 - Add author and link columns to opac course reserves table

To test:
1 - Add some course reserves
2 - View the table in staff and opac, there is no column for author or
link
3 - Apply patch
4 - You shoudl see these columns
5 - Link should contain item uri if present, fallback to title 856$u,
  then be blank if niether

Sponsored by:
Southeastern Wisconsin Information Technology Exchange, Inc (SWITCH)
(http://caspian.switchinc.org/)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15853] Add author and link columns to opac course reserves table

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15853

Nick Clemens  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52959|0   |1
is obsolete||

--- Comment #22 from Johanna Räisä  ---
Created attachment 52976
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52976=edit
[SIGNED-OFF] Bug 16699: Fix mixed-up indentation from 2-4 spaces to 2 spaces

These definitions had indentation of 4 spaces, while rest of the specification
uses 2 spaces. This patch simply maintains the consistency in indentations and
provides no other modifications to code.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52958|0   |1
is obsolete||

--- Comment #21 from Johanna Räisä  ---
Created attachment 52975
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52975=edit
[SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for reusability

The borrowernumber as a query parameter should be defined in parameters.json
in order to allow its reusability.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate swagger.min.json in online.swagger.io/validator/debug?url=url_to+
   _your_swagger_min_json or your local swagger-api/validator-badge validator
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52957|0   |1
is obsolete||

--- Comment #20 from Johanna Räisä  ---
Created attachment 52974
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52974=edit
[SIGNED-OFF] Bug 16699: Split parameters and paths in Swagger

Parameters and paths should be split in our Swagger specification, because
otherwise swagger.json would become messy with all the paths and their
further specification in the same file. Also parameters should be split
for the same reason.

Instead of using index.json for definitions, parameters and paths, we define
new files "definitions.json", "parameters.json" and "paths.json" in order to
simplify the references. If we kept using index.json and try to reference
"/definitions/error.json" from "/paths/holds.json", reference would be
"../definitions/index.json#/error" instead of now simplified version,
"../definitions.json#/error".

Here is the proposed structure:

.
├── swagger.json
├── definitions.json
├── paths.json
├── parameters.json
├── definitions
│   └── error.json
│   └── patron.json
├── parameters
│   └── patron.json
├── paths
│   └── patrons.json
├── minifySwagger.pl
└── swagger.min.js

The swagger.json paths, definitions and parameters will look as follows:
...
  "paths": {
"$ref": "paths.json"
  },
  "definitions": {
"$ref": "definitions.json"
  },
  "parameters": {
"$ref": "parameters.json"
  }
...

A problem with splitting specification into multiple files directly from
swagger.json (e.g. "paths": { "$ref": "paths.json" }) is that it is not
following the Swagger specification and an error will be thrown by the
Swagger-UI default validator (online.swagger.io/validator).

To overcome this problem, we use the minifySwagger.pl script from Buug 16212.
This allows the developers to work with the structure introduced in this patch
thus allowing developers to split the specification nicely, and still have a
valid Swagger specification in the minified swagger.min.json.

To test:
-2: Apply the minifier-patch in Buug 16212.
-1: Make sure you can validate your specification with Swagger2 validator at
online.swagger.io/validator/debug?url=url_to_swaggerjson, or install it
locally from https://github.com/swagger-api/validator-badge.

1. Don't apply this patch yet, but first validate swagger.json
   with swagger.io-validator (or your local version, if you installed it)
2. Observe that validation errors are given
3. Run minifySwagger.pl
4. Validate swagger.min.json with the validator you used in step 1
5. Observe that validation passes and we overcame the invalid specification
   problem in swagger.min.json
6. Apply this patch
7. Run minifySwagger.pl
8. Repeat step 4
9. Observe that validation passes with new structure
10. Run REST tests at t/db_dependents/api/v1

(11. Study the new structure of our Swagger specifications :))

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52955|0   |1
is obsolete||

--- Comment #21 from Johanna Räisä  ---
Created attachment 52973
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52973=edit
Bug 16212: Automatically minify swagger.json

This patch adds automatic minification of swagger.json. Since startup
subroutine
is executed on each call to REST API, we need to be careful to not do useless
computation by minificating swagger.json when not required. Therefore, we need
some algorithm to determine whether minification is needed. In this patch,
minification is executed in two cases:
1. swagger.min.json does not exist
2. any of the specification files is modified more recently than
   swagger.min.json

Includes tests.

This feature requires Apache user to have write permissions to
swagger.min.json,
otherwise we cannot minify the specification automatically. Another solution is
to run the minifySwagger.pl manually after each modification or create a daemon
that listens to file modifications via "inotify" and executes minification when
needed.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

--- Comment #20 from Johanna Räisä  ---
Created attachment 52972
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52972=edit
[SIGNED-OFF] Bug 16212: Use swagger.min.json insted of swagger.json

Our current approach with splitting the Swagger specification brings problems.
For example, in swagger.json, if we split the whole "definitions" object with
$ref, validations will fail with online.swagger.io validator.

(See http://online.swagger.io/validator/debug?url=url_to_your_swagger_json)

The problem also occurs with "paths" (Paths Object), because simply $ref to all
paths for example in /paths/index.json does not meet the Swagger2
specification.

The problem is solved by using the minification script and the minified version
of swagger.json after which the swagger.min.json is valid Swagger2
specification,
because the minifier resolves the problematic $refs of swagger.json file in the
minified version.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52954|0   |1
is obsolete||

--- Comment #19 from Johanna Räisä  ---
Created attachment 52971
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52971=edit
Bug 16212: Use swagger.min.json insted of swagger.json

Our current approach with splitting the Swagger specification brings problems.
For example, in swagger.json, if we split the whole "definitions" object with
$ref, validations will fail with online.swagger.io validator.

(See http://online.swagger.io/validator/debug?url=url_to_your_swagger_json)

The problem also occurs with "paths" (Paths Object), because simply $ref to all
paths for example in /paths/index.json does not meet the Swagger2
specification.

The problem is solved by using the minification script and the minified version
of swagger.json after which the swagger.min.json is valid Swagger2
specification,
because the minifier resolves the problematic $refs of swagger.json file in the
minified version.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

--- Comment #18 from Johanna Räisä  ---
Created attachment 52970
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52970=edit
[SIGNED-OFF] Bug 16212: Move from misc/devel to api/v1

Move minifySwagger.pl from misc/devel to api/v1 since it is directly related
to swagger.json and the usage is simplified when it is in the same location
with
swagger.json.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Johanna Räisä  changed:

   What|Removed |Added

  Attachment #52968|0   |1
is obsolete||

--- Comment #17 from Johanna Räisä  ---
Created attachment 52969
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52969=edit
[SIGNED-OFF] Bug 16212: Add script minifySwagger.pl

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 12996] Tool to bulk export patrons images

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12996

Owen Leonard  changed:

   What|Removed |Added

 CC||aidas...@ysu.am

--- Comment #1 from Owen Leonard  ---
*** Bug 13126 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 13126] Batch export patron images

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13126

Owen Leonard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Owen Leonard  ---


*** This bug has been marked as a duplicate of bug 12996 ***

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

--- Comment #16 from Olli-Antti Kivilahti  ---
Created attachment 52968
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52968=edit
[SIGNED-OFF] Bug 16212: Add script minifySwagger.pl

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa 

My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52963|0   |1
is obsolete||

--- Comment #15 from Olli-Antti Kivilahti  ---
Created attachment 52967
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52967=edit
Bug 14868: Rename 'x-koha-permission' to 'x-koha-authorization'

Since we need to be able to define other authorization options than simply Koha
permissions, for example "allow-owner", we should rename x-koha-permission into
x-koha-authorization to better describe the object.

This patch simply renames all occurences of x-koha-permission into
x-koha-authorization.

The new specification for authorization:
"/patrons/{borrowernumber}": {
  ..
  "x-koha-authorization": {
 "allow-owner": "1",
 "pemissions": {
   "borrowers": "1"
 }
  }
}

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52604|0   |1
is obsolete||

--- Comment #14 from Olli-Antti Kivilahti  ---
Created attachment 52966
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52966=edit
Bug 14868: Use x-koha-permission in current routes

Adds missing permission checking to holds. Adds 6 tests to patrons.t, adds 30
tests to holds.t.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52603|0   |1
is obsolete||

--- Comment #13 from Olli-Antti Kivilahti  ---
Created attachment 52965
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52965=edit
Bug 14868: Give users possibility to request their own object

If the user has no required permissions, but attempts to access his own object,
allow this request in case "x-koha-permission" has defined "allow-owner": "1".

As an example, the following resource can be accessed if user has
borrowers-flag
or if he is making the request to his own borrowernumber (in path or body):

"/patrons/{borrowernumber}": {
  ..
  "x-koha-permission": {
"allow-owner": "1",
"permissions": {
  "borrowers": "1"
}
  }
}

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52602|0   |1
is obsolete||

--- Comment #12 from Olli-Antti Kivilahti  ---
Created attachment 52964
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52964=edit
Bug 14868: Swagger2-driven Permission checking

A hasty downgrade from 13920, utilizing new features implemented by the
Mojolicious::Plugin::Swagger2-author, to make it possible to implement more
complex authentication/authorization scenarios with the Plugin.

Define 'x-koha-permission' for the Swagger2 Operation Object, to automatically
authorize against the required permissions.

This way we immediately tell the API consumer in the Swagger2-definition, which
permissions are needed to access defined resources.
Also we don't need to maintain permissions in multiple locations and we can
build
a smart testing framework to help a lot in creating tests for the new REST API.

Rebase notes from 2015-09-22 to 2016-06-20:
- In patrons.t, change expected HTTP 403 to 401 when accessing the endpoint
  without authentication (401 = not authenticated, 403 = authenticated, but no
  permission).

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14868] REST API: Swagger2-driven permission checking

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868

--- Comment #11 from Lari Taskula  ---
Created attachment 52963
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52963=edit
Bug 14868: Rename 'x-koha-permission' to 'x-koha-authorization'

Since we need to be able to define other authorization options than simply Koha
permissions, for example "allow-owner", we should rename x-koha-permission into
x-koha-authorization to better describe the object.

This patch simply renames all occurences of x-koha-permission into
x-koha-authorization.

The new specification for authorization:
"/patrons/{borrowernumber}": {
  ..
  "x-koha-authorization": {
 "allow-owner": "1",
 "pemissions": {
   "borrowers": "1"
 }
  }
}

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52376|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52956|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52377|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

 CC||olli-antti.kivila...@jns.fi
  Attachment #52378|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52379|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52581|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #19 from Olli-Antti Kivilahti  ---
Created attachment 52962
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52962=edit
[SIGNED-OFF] Bug 16699: Move Swagger-related files to api/v1/swagger

This patch separates Swagger-specifications and the minifySwagger.pl from other
api-files by moving specifications & minifier into api/v1/swagger.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #18 from Olli-Antti Kivilahti  ---
Created attachment 52961
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52961=edit
[SIGNED-OFF] Bug 16699: Reference new x-primitives in currently defined objects

Since we have defined some basic x-primitives in x-primitives.json, we can now
start to reuse them in our currently defined objects.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate your Swagger specifications
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #17 from Olli-Antti Kivilahti  ---
Created attachment 52960
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52960=edit
[SIGNED-OFF] Bug 16699: Support multiple types in primitive definitions

Currently it is not possible to define multiple types for primitive definitions
in /definitions/*. If you try to use the following
"firstname": {
  "type": ["string", "null"],
  "description": "patron's first name"
}
in definitions.json, online.swagger.io validator will not validate it:
{"messages":["attribute definitions.firstname.type is not of type `string`"]}

One way to get around this issue is to extend definitions with custom
"x-primitives" object, where we will define all reusable primitive definitions.

To test:
1. Add the "firstname" example above to definitions.json
2. Run minifySwagger.pl
3. Validate your specification
4. Observe that error with description mentioned above is given
5. Apply patch
6. Repeat step 2 and 3
7. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #16 from Olli-Antti Kivilahti  ---
Created attachment 52959
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52959=edit
[SIGNED-OFF] Bug 16699: Fix mixed-up indentation from 2-4 spaces to 2 spaces

These definitions had indentation of 4 spaces, while rest of the specification
uses 2 spaces. This patch simply maintains the consistency in indentations and
provides no other modifications to code.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #15 from Olli-Antti Kivilahti  ---
Created attachment 52958
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52958=edit
[SIGNED-OFF] Bug 16699: Add borrowernumberQueryParam for reusability

The borrowernumber as a query parameter should be defined in parameters.json
in order to allow its reusability.

To test:
1. Apply patch
2. Run minifySwagger.pl
3. Validate swagger.min.json in online.swagger.io/validator/debug?url=url_to+
   _your_swagger_min_json or your local swagger-api/validator-badge validator
4. Observe that validation passes

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

--- Comment #14 from Olli-Antti Kivilahti  ---
Created attachment 52957
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52957=edit
[SIGNED-OFF] Bug 16699: Split parameters and paths in Swagger

Parameters and paths should be split in our Swagger specification, because
otherwise swagger.json would become messy with all the paths and their
further specification in the same file. Also parameters should be split
for the same reason.

Instead of using index.json for definitions, parameters and paths, we define
new files "definitions.json", "parameters.json" and "paths.json" in order to
simplify the references. If we kept using index.json and try to reference
"/definitions/error.json" from "/paths/holds.json", reference would be
"../definitions/index.json#/error" instead of now simplified version,
"../definitions.json#/error".

Here is the proposed structure:

.
├── swagger.json
├── definitions.json
├── paths.json
├── parameters.json
├── definitions
│   └── error.json
│   └── patron.json
├── parameters
│   └── patron.json
├── paths
│   └── patrons.json
├── minifySwagger.pl
└── swagger.min.js

The swagger.json paths, definitions and parameters will look as follows:
...
  "paths": {
"$ref": "paths.json"
  },
  "definitions": {
"$ref": "definitions.json"
  },
  "parameters": {
"$ref": "parameters.json"
  }
...

A problem with splitting specification into multiple files directly from
swagger.json (e.g. "paths": { "$ref": "paths.json" }) is that it is not
following the Swagger specification and an error will be thrown by the
Swagger-UI default validator (online.swagger.io/validator).

To overcome this problem, we use the minifySwagger.pl script from Buug 16212.
This allows the developers to work with the structure introduced in this patch
thus allowing developers to split the specification nicely, and still have a
valid Swagger specification in the minified swagger.min.json.

To test:
-2: Apply the minifier-patch in Buug 16212.
-1: Make sure you can validate your specification with Swagger2 validator at
online.swagger.io/validator/debug?url=url_to_swaggerjson, or install it
locally from https://github.com/swagger-api/validator-badge.

1. Don't apply this patch yet, but first validate swagger.json
   with swagger.io-validator (or your local version, if you installed it)
2. Observe that validation errors are given
3. Run minifySwagger.pl
4. Validate swagger.min.json with the validator you used in step 1
5. Observe that validation passes and we overcame the invalid specification
   problem in swagger.min.json
6. Apply this patch
7. Run minifySwagger.pl
8. Repeat step 4
9. Observe that validation passes with new structure
10. Run REST tests at t/db_dependents/api/v1

(11. Study the new structure of our Swagger specifications :))

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 16699] Swagger: Split parameters and paths, and specify required permissions for resource

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52375|0   |1
is obsolete||

--- Comment #13 from Olli-Antti Kivilahti  ---
Created attachment 52956
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52956=edit
Bug 16699: Split parameters and paths in Swagger

Parameters and paths should be split in our Swagger specification, because
otherwise swagger.json would become messy with all the paths and their
further specification in the same file. Also parameters should be split
for the same reason.

Instead of using index.json for definitions, parameters and paths, we define
new files "definitions.json", "parameters.json" and "paths.json" in order to
simplify the references. If we kept using index.json and try to reference
"/definitions/error.json" from "/paths/holds.json", reference would be
"../definitions/index.json#/error" instead of now simplified version,
"../definitions.json#/error".

Here is the proposed structure:

.
├── swagger.json
├── definitions.json
├── paths.json
├── parameters.json
├── definitions
│   └── error.json
│   └── patron.json
├── parameters
│   └── patron.json
├── paths
│   └── patrons.json
├── minifySwagger.pl
└── swagger.min.js

The swagger.json paths, definitions and parameters will look as follows:
...
  "paths": {
"$ref": "paths.json"
  },
  "definitions": {
"$ref": "definitions.json"
  },
  "parameters": {
"$ref": "parameters.json"
  }
...

A problem with splitting specification into multiple files directly from
swagger.json (e.g. "paths": { "$ref": "paths.json" }) is that it is not
following the Swagger specification and an error will be thrown by the
Swagger-UI default validator (online.swagger.io/validator).

To overcome this problem, we use the minifySwagger.pl script from Buug 16212.
This allows the developers to work with the structure introduced in this patch
thus allowing developers to split the specification nicely, and still have a
valid Swagger specification in the minified swagger.min.json.

To test:
-2: Apply the minifier-patch in Buug 16212.
-1: Make sure you can validate your specification with Swagger2 validator at
online.swagger.io/validator/debug?url=url_to_swaggerjson, or install it
locally from https://github.com/swagger-api/validator-badge.

1. Don't apply this patch yet, but first validate swagger.json
   with swagger.io-validator (or your local version, if you installed it)
2. Observe that validation errors are given
3. Run minifySwagger.pl
4. Validate swagger.min.json with the validator you used in step 1
5. Observe that validation passes and we overcame the invalid specification
   problem in swagger.min.json
6. Apply this patch
7. Run minifySwagger.pl
8. Repeat step 4
9. Observe that validation passes with new structure
10. Run REST tests at t/db_dependents/api/v1

(11. Study the new structure of our Swagger specifications :))

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0
We participated in the development of the Mojolicious::Plugin::Swagger and know
it well. We have made an extension to the plugin to provide full CORS support
and have been building all our in-house features on the new REST API.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 15006] Need to distinguish client timeout from login timeout

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15006

--- Comment #40 from Marcel de Rooy  ---
(In reply to Colin Campbell from comment #39)
> A problem is the timeout send back in acs_status is a transaction timeout.
> Strictly when that timeout elapses the client sould revert the current
> transaction but the connection should be maintained. There is of course
> already a timeout on the connection at tcp level if you are using keep alives

OK That is clear. So we indeed need another one.
This transaction timeout could perhaps be placed at a more logical place in the
config?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15006] Need to distinguish client timeout from login timeout

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15006

--- Comment #39 from Colin Campbell  ---
(In reply to Marcel de Rooy from comment #22)
> Created attachment 52480 [details] [review]
> Bug 15006: [COUNTERPATCH] Timeout logic in sip_protocol_loop
> 
> Instead of adding yet another client timeout, I propose to use the
> policy timeout that we also communicate in send_acs_status.
> Although I agree that we perhaps better move it from institution to
> account/login level, this c/should be done on another report. We
> may have issues with existing configurations.
> 
> In order to find a compromise between bug 13432 and the originally
> proposed 15006 patch, this patch allows you to put a zero in the
> policy timeout entry in the SIPconfig.
> 
> The timeout logic is moved to a Sip.pm subroutine. Will add a test :)
> 
> Test plan:
> [1] Check timeout after login with policy/timeout > 0.
> [2] Check timeout after login with policy/timeout = 0. (No timeout!)
> [3] Check timeout after login with no policy timeout. Fallback to service.
> [4] Check timeout after login with no policy and service timeout.
> Should fallback to 30 seconds for both login process and after login.
> 
> Signed-off-by: Marcel de Rooy 

A problem is the timeout send back in acs_status is a transaction timeout.
Strictly when that timeout elapses the client sould revert the current
transaction but the connection should be maintained. There is of course already
a timeout on the connection at tcp level if you are using keep alives

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||olli-antti.kivila...@jns.fi

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52651|0   |1
is obsolete||

--- Comment #15 from Olli-Antti Kivilahti  ---
Created attachment 52955
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52955=edit
Bug 16212: Automatically minify swagger.json

This patch adds automatic minification of swagger.json. Since startup
subroutine
is executed on each call to REST API, we need to be careful to not do useless
computation by minificating swagger.json when not required. Therefore, we need
some algorithm to determine whether minification is needed. In this patch,
minification is executed in two cases:
1. swagger.min.json does not exist
2. any of the specification files is modified more recently than
   swagger.min.json

Includes tests.

This feature requires Apache user to have write permissions to
swagger.min.json,
otherwise we cannot minify the specification automatically. Another solution is
to run the minifySwagger.pl manually after each modification or create a daemon
that listens to file modifications via "inotify" and executes minification when
needed.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52369|0   |1
is obsolete||

--- Comment #14 from Olli-Antti Kivilahti  ---
Created attachment 52954
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52954=edit
Bug 16212: Use swagger.min.json insted of swagger.json

Our current approach with splitting the Swagger specification brings problems.
For example, in swagger.json, if we split the whole "definitions" object with
$ref, validations will fail with online.swagger.io validator.

(See http://online.swagger.io/validator/debug?url=url_to_your_swagger_json)

The problem also occurs with "paths" (Paths Object), because simply $ref to all
paths for example in /paths/index.json does not meet the Swagger2
specification.

The problem is solved by using the minification script and the minified version
of swagger.json after which the swagger.min.json is valid Swagger2
specification,
because the minifier resolves the problematic $refs of swagger.json file in the
minified version.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #52368|0   |1
is obsolete||

--- Comment #13 from Olli-Antti Kivilahti  ---
Created attachment 52953
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52953=edit
Bug 16212: Move from misc/devel to api/v1

Move minifySwagger.pl from misc/devel to api/v1 since it is directly related
to swagger.json and the usage is simplified when it is in the same location
with
swagger.json.

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16212] Swagger specification separation and minification

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

Olli-Antti Kivilahti  changed:

   What|Removed |Added

  Attachment #49950|0   |1
is obsolete||

--- Comment #12 from Olli-Antti Kivilahti  ---
Created attachment 52952
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52952=edit
Bug 16212: Add script minifySwagger.pl

Signed-off-by: Olli-Antti Kivilahti 

My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15006] Need to distinguish client timeout from login timeout

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15006

--- Comment #38 from Marcel de Rooy  ---
(In reply to Colin Campbell from comment #37)
> (In reply to Kyle M Hall from comment #34)
> > I like this proposal, but I think we should get Colin's testing and input
> > before setting it to Passed QA.
> 
> It was me saying I'll test --- I was masquerading as Martin

Secure passwords :) Thx. Could you also have a look at comment26 ?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15006] Need to distinguish client timeout from login timeout

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15006

--- Comment #37 from Colin Campbell  ---
(In reply to Kyle M Hall from comment #34)
> I like this proposal, but I think we should get Colin's testing and input
> before setting it to Passed QA.

It was me saying I'll test --- I was masquerading as Martin

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16836] Document unused parameters of SearchAuthorities

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16836

Marcel de Rooy  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
   Patch complexity|--- |Trivial patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16836] Document unused parameters of SearchAuthorities

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16836

--- Comment #1 from Marcel de Rooy  ---
Created attachment 52951
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52951=edit
Bug 16836: Document unused parameters of SearchAuthorities

Two parameters $and_or and $excluding are not used.

Test plan:
Run t/db_dependent/Search.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16836] Document unused parameters of SearchAuthorities

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16836

Marcel de Rooy  changed:

   What|Removed |Added

   Assignee|gmcha...@gmail.com  |m.de.r...@rijksmuseum.nl

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16836] New: Document unused parameters of SearchAuthorities

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16836

Bug ID: 16836
   Summary: Document unused parameters of SearchAuthorities
 Change sponsored?: ---
   Product: Koha
   Version: master
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P5 - low
 Component: Searching
  Assignee: gmcha...@gmail.com
  Reporter: m.de.r...@rijksmuseum.nl
QA Contact: testo...@bugs.koha-community.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 16835] New: Upgrade database failed from 3.2200000 to new version

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16835

Bug ID: 16835
   Summary: Upgrade database failed from 3.220 to new version
 Change sponsored?: ---
   Product: Koha
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: enhancement
  Priority: P5 - low
 Component: Installation and upgrade (web-based installer)
  Assignee: koha-bugs@lists.koha-community.org
  Reporter: lenhatan...@gmail.com
QA Contact: testo...@bugs.koha-community.org
CC: gmcha...@gmail.com

Update errors :

[Thu Jun 30 16:12:57 2016] updatedatabase.pl: DBD::mysql::st execute
failed: Data truncated for column 'type' at row 1 [for Statement "INSERT INTO
`search_field` ( `label`, `name`, `type`) VALUES ( ?, ?, ? )" with ParamValues:
0='Match', 1='Match', 2=''] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line
1834.
[Thu Jun 30 16:12:57 2016] updatedatabase.pl:
DBIx::Class::Storage::DBI::_dbh_execute(): Data truncated for column 'type' at
row 1 at /usr/share/koha/lib/Koha/Objects.pm line 101


When I checked code on git, this error maybe related with file
/admin/searchengine/elasticsearch/mappings.yaml and file
installer/data/mysql/updatedatabase.pl (from line 12263)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 11210] Allow partial writeoff

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11210

Mike  changed:

   What|Removed |Added

 CC||blac...@gmail.com,
   ||josef.mora...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 14827] Merge various subroutines for paying fees into one

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14827

Mike  changed:

   What|Removed |Added

 CC||blac...@gmail.com,
   ||m...@jkozlovsky.cz

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 15364] fines and invoices in letter templates

2016-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15364

Mike  changed:

   What|Removed |Added

 CC||blac...@gmail.com,
   ||josef.mora...@gmail.com,
   ||m...@jkozlovsky.cz

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   >