[Koha-bugs] [Bug 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Katrin Fischer changed: What|Removed |Added CC||ro...@catalyst.net.nz --- Comment #127 from Katrin Fischer --- *** Bug 13607 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Pete Edwards changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=21219 -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Nick Clemenschanged: What|Removed |Added Status|Pushed to Master|RESOLVED Resolution|--- |FIXED CC||n...@bywatersolutions.com --- Comment #126 from Nick Clemens --- New feature, not backported for 17.11.x -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Jonathan Druartchanged: What|Removed |Added Keywords|release-notes-needed| -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Katrin Fischerchanged: What|Removed |Added Text to go in the|REST API route for managing |REST API route for managing release notes|patrons in database. Adds |patrons in database. Adds |CRUD implementation for |CRUD implementation for |creating, reading, updating |creating, reading, updating |and deleting patrons, as|and deleting patrons, as |well as listing with|well as listing with |optional sorting. |optional sorting. | | |Follows |Follows |new guidelines from REST|new guidelines from REST |API RFC and Koha Object |API RFC and Koha Object |Exceptions regarding|Exceptions regarding |validation and error|validation and error |handling. Patron can modify |handling. Patrons can |and delete own object, or |modify and delete their own |anyone with borrower|object, or anyone with |modification permissions. |borrower modification ||permissions. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Benjamin Roksethchanged: What|Removed |Added Text to go in the||REST API route for managing release notes||patrons in database. Adds ||CRUD implementation for ||creating, reading, updating ||and deleting patrons, as ||well as listing with ||optional sorting. || ||Follows ||new guidelines from REST ||API RFC and Koha Object ||Exceptions regarding ||validation and error ||handling. Patron can modify ||and delete own object, or ||anyone with borrower ||modification permissions. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #125 from Jonathan Druart--- (In reply to Jonathan Druart from comment #124) > Created attachment 73434 [details] [review] > Bug 16330: Remove unecessary Koha::Patron->store method > > Signed-off-by: Jonathan Druart Pushed to master. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #124 from Jonathan Druart--- Created attachment 73434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73434=edit Bug 16330: Remove unecessary Koha::Patron->store method Signed-off-by: Jonathan Druart -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #123 from Jonathan Druart--- (In reply to Tomás Cohen Arazi from comment #112) > (In reply to Jonathan Druart from comment #111) > > 1. I have squashed the patches to review them and see that > > Koha::Patron->store only calls SUPER->store. > Just a note: this is rewritten in the follow-up bug, right? Nope, it is not. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Jonathan Druartchanged: What|Removed |Added Status|Passed QA |Pushed to Master --- Comment #122 from Jonathan Druart --- Pushed to master for 18.05, thanks to everybody involved! -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #121 from Tomás Cohen Arazi--- (In reply to Jonathan Druart from comment #119) > (In reply to Tomás Cohen Arazi from comment #118) > > (In reply to Jonathan Druart from comment #117) > > > With bug 20287 we will have to redo it again... > > > > Not a problem! > > You are volunteering, right? Given the fact that you have this and bug 19784 on your queue, I'd say we should add a follow-up for 20287 (I can) because this patchsets have become harder to rebase. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #120 from Tomás Cohen Arazi--- (In reply to Jonathan Druart from comment #119) > (In reply to Tomás Cohen Arazi from comment #118) > > (In reply to Jonathan Druart from comment #117) > > > With bug 20287 we will have to redo it again... > > > > Not a problem! > > You are volunteering, right? Count on that, yes! -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #119 from Jonathan Druart--- (In reply to Tomás Cohen Arazi from comment #118) > (In reply to Jonathan Druart from comment #117) > > With bug 20287 we will have to redo it again... > > Not a problem! You are volunteering, right? -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #118 from Tomás Cohen Arazi--- (In reply to Jonathan Druart from comment #117) > With bug 20287 we will have to redo it again... Not a problem! -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #117 from Jonathan Druart--- With bug 20287 we will have to redo it again... -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Jonathan Druartchanged: What|Removed |Added Keywords||release-notes-needed -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Claudiochanged: What|Removed |Added CC||cost...@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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #116 from Jonathan Druart--- (In reply to Tomás Cohen Arazi from comment #115) > (In reply to Jonathan Druart from comment #114) > > From AddMember, added by bug 19841: > > > > my $category = Koha::Patron::Categories->find( $data{categorycode} ); > > unless ($category) { > > Koha::Exceptions::BadParameter->throw( > > error => 'Invalid parameter passed', > > parameter => 'categorycode' > > ); > > } > > > > Must not we remove that? > > This belongs to a separate bug, of course. The thing is: we need the > category object to specify a default expiration date and default privacy. We > need that information before ->store. And if the category object is undef, > then we have nothing to do... so better exit before doing more calculations > (set values if defined $category, etc). > > I think it is ok as it is. The problem is that the whole stuff is not done in a transaction, in that case we will not need it. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #115 from Tomás Cohen Arazi--- (In reply to Jonathan Druart from comment #114) > From AddMember, added by bug 19841: > > my $category = Koha::Patron::Categories->find( $data{categorycode} ); > unless ($category) { > Koha::Exceptions::BadParameter->throw( > error => 'Invalid parameter passed', > parameter => 'categorycode' > ); > } > > Must not we remove that? This belongs to a separate bug, of course. The thing is: we need the category object to specify a default expiration date and default privacy. We need that information before ->store. And if the category object is undef, then we have nothing to do... so better exit before doing more calculations (set values if defined $category, etc). I think it is ok as it is. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #114 from Jonathan Druart--- >From AddMember, added by bug 19841: my $category = Koha::Patron::Categories->find( $data{categorycode} ); unless ($category) { Koha::Exceptions::BadParameter->throw( error => 'Invalid parameter passed', parameter => 'categorycode' ); } Must not we remove that? -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #113 from Benjamin Rokseth--- (In reply to Jonathan Druart from comment #110) > Benjamin, do you agree with Tomas's changes? Nothing to add, well done pushing this forward! -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #112 from Tomás Cohen Arazi--- (In reply to Jonathan Druart from comment #111) > 1. I have squashed the patches to review them and see that > Koha::Patron->store only calls SUPER->store. > > 2. Koha::REST::V1::{Patrons,Cities}->list are different, must not be > identical? > > > Just a note for later: I think it should be the only routes added that do > not use Koha::Cities pattern (i.e. full Koha::Objects based). Just a note: this is rewritten in the follow-up bug, right? -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #111 from Jonathan Druart--- 1. I have squashed the patches to review them and see that Koha::Patron->store only calls SUPER->store. 2. Koha::REST::V1::{Patrons,Cities}->list are different, must not be identical? Just a note for later: I think it should be the only routes added that do not use Koha::Cities pattern (i.e. full Koha::Objects based). -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #110 from Jonathan Druart--- Benjamin, do you agree with Tomas's changes? -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #107 from Josef Moravec--- Created attachment 71936 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71936=edit Bug 16330: (QA follow-up) ModMember requires borrowernumber Works perfectly. Well done everyone! Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Dilan Johnpullé Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #108 from Josef Moravec--- Created attachment 71937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71937=edit Bug 16330: Remove validation code from Koha::Patron This patch removes previously added validation code from Koha::Patron as we will rely on the DB structure and relationships to catch the same problems. This is implemented on bug 19828. This patch also adapts the API controller class to expect this behaviour change from Koha::Patron. The expected exceptions are adjusted, and some minor changes take place. The API tests are adjusted as well. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests should still pass Signed-off-by: Tomas Cohen Arazi Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #109 from Josef Moravec--- Created attachment 71938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71938=edit Bug 16330: (QA follow-up) Update usage of search plugin because of bug 19686 Test plan: prove t/db_dependent/api/v1/patrons.t --> without patch the list subtest fail --> with patch test pass Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #105 from Josef Moravec--- Created attachment 71934 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71934=edit Bug 16330: Move patches to OpenAPI This patch refactors the original work so it implements the controllers and the spec using Mojolicious::Plugin::OpenAPI, and OpenAPI for the specification. It removes the ability for patrons without permissions to edit their own data or their guarantee's. This will be moved to a patron modification requests endpoint for simplicity. It makes use of bugs 19410 and 19686 and their dependencies to deal with parameters handling, query building and pagination. Tests are adapted. To test: - Apply this patches and the dependencies - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #106 from Josef Moravec--- Created attachment 71935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71935=edit Bug 16330: (QA follow-up) Repect guidelines on plurals Patron > Patrons Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Tomas Cohen Arazi Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Josef Moravecchanged: What|Removed |Added Attachment #71920|0 |1 is obsolete|| Attachment #71921|0 |1 is obsolete|| Attachment #71922|0 |1 is obsolete|| Attachment #71923|0 |1 is obsolete|| Attachment #71924|0 |1 is obsolete|| Attachment #71925|0 |1 is obsolete|| --- Comment #104 from Josef Moravec --- Created attachment 71933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71933=edit Bug 16330: Add routes to add, update and delete patrons This patch adds support for add, edit and delete patrons via REST API. GET /api/v1/patrons Get patron list from params GET /api/v1/patrons/ Get single patron POST /api/v1/patrons Create a new patron PUT /api/v1/patrons/ Update data about patron DEL /api/v1/patrons/ Delete a patron Revised Test plan: 1) Apply this patch 2) Run tests perl t/db_dependent/api/v1/patrons.t 3) Add a user with proper rights to use the REST API 4) play with your favourite REST client (curl/httpie, etc.): Authenticate with the user created above and get a CGISESSION id. Use the CGISESSION to add, edit and delete patrons via the API. 5) Use PUT /patrons/ for a patron without borrowers flag. This should go into pending patron modification status and needs to be accepted by a librarian. Please note there is no validation of body input in PUT/POST other than branchcode,category,userid,cardnumber. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Josef Moravec -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Josef Moravecchanged: What|Removed |Added Status|Failed QA |Passed QA -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #103 from Josef Moravec--- (In reply to Tomás Cohen Arazi from comment #102) > (In reply to Josef Moravec from comment #100) > > > > > > 5) Use PUT /patrons/ for a patron without borrowers > > >flag. This should go into pending patron modification status and > > >needs to be accepted by a librarian. > > > > > This is not implemented, do we need this? Failed QA means I need an answer > > as this is in test plan and does not work. Otherwise looks good. > > Look at the comment in 'Move patches to OpenAPI': > > > "It removes the ability for patrons without permissions to edit their own > data or their > guarantee's. This will be moved to a patron modification requests endpoint > for simplicity." I am totally blind, does make sense, thanks! -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #102 from Tomás Cohen Arazi--- (In reply to Josef Moravec from comment #100) > > > > 5) Use PUT /patrons/ for a patron without borrowers > >flag. This should go into pending patron modification status and > >needs to be accepted by a librarian. > > > This is not implemented, do we need this? Failed QA means I need an answer > as this is in test plan and does not work. Otherwise looks good. Look at the comment in 'Move patches to OpenAPI': "It removes the ability for patrons without permissions to edit their own data or their guarantee's. This will be moved to a patron modification requests endpoint for simplicity." -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #101 from Tomás Cohen Arazi--- (In reply to Josef Moravec from comment #100) > > > > 5) Use PUT /patrons/ for a patron without borrowers > >flag. This should go into pending patron modification status and > >needs to be accepted by a librarian. > > > This is not implemented, do we need this? Failed QA means I need an answer > as this is in test plan and does not work. Otherwise looks good. The patrons endpoint is finished on the follow-up bug. We kept this one to preserve the original attribution. One of the things we did was removing that complexity. We don't need it, we voted an RFC which is implemented on the other bug > Also, I added small follow-up, and rebased again on current master (small > conflict in Koha/Patron.pm) Excellent. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Josef Moravecchanged: What|Removed |Added Status|Signed Off |Failed QA --- Comment #100 from Josef Moravec --- > > 5) Use PUT /patrons/ for a patron without borrowers >flag. This should go into pending patron modification status and >needs to be accepted by a librarian. > This is not implemented, do we need this? Failed QA means I need an answer as this is in test plan and does not work. Otherwise looks good. Also, I added small follow-up, and rebased again on current master (small conflict in Koha/Patron.pm) -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #97 from Josef Moravec--- Created attachment 71923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71923=edit Bug 16330: (QA follow-up) ModMember requires borrowernumber Works perfectly. Well done everyone! Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Dilan Johnpullé -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #98 from Josef Moravec--- Created attachment 71924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71924=edit Bug 16330: Remove validation code from Koha::Patron This patch removes previously added validation code from Koha::Patron as we will rely on the DB structure and relationships to catch the same problems. This is implemented on bug 19828. This patch also adapts the API controller class to expect this behaviour change from Koha::Patron. The expected exceptions are adjusted, and some minor changes take place. The API tests are adjusted as well. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests should still pass Signed-off-by: Tomas Cohen Arazi -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #99 from Josef Moravec--- Created attachment 71925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71925=edit Bug 16330: (QA follow-up) Update usage of search plugin because of bug 19686 Test plan: prove t/db_dependent/api/v1/patrons.t --> without patch the list subtest fail --> with patch test pass -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #96 from Josef Moravec--- Created attachment 71922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71922=edit Bug 16330: (QA follow-up) Repect guidelines on plurals Patron > Patrons Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Tomas Cohen Arazi -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #95 from Josef Moravec--- Created attachment 71921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71921=edit Bug 16330: Move patches to OpenAPI This patch refactors the original work so it implements the controllers and the spec using Mojolicious::Plugin::OpenAPI, and OpenAPI for the specification. It removes the ability for patrons without permissions to edit their own data or their guarantee's. This will be moved to a patron modification requests endpoint for simplicity. It makes use of bugs 19410 and 19686 and their dependencies to deal with parameters handling, query building and pagination. Tests are adapted. To test: - Apply this patches and the dependencies - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Josef Moravecchanged: What|Removed |Added Attachment #71667|0 |1 is obsolete|| Attachment #71668|0 |1 is obsolete|| Attachment #71669|0 |1 is obsolete|| Attachment #71670|0 |1 is obsolete|| Attachment #71671|0 |1 is obsolete|| --- Comment #94 from Josef Moravec --- Created attachment 71920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71920=edit Bug 16330: Add routes to add, update and delete patrons This patch adds support for add, edit and delete patrons via REST API. GET /api/v1/patrons Get patron list from params GET /api/v1/patrons/ Get single patron POST /api/v1/patrons Create a new patron PUT /api/v1/patrons/ Update data about patron DEL /api/v1/patrons/ Delete a patron Revised Test plan: 1) Apply this patch 2) Run tests perl t/db_dependent/api/v1/patrons.t 3) Add a user with proper rights to use the REST API 4) play with your favourite REST client (curl/httpie, etc.): Authenticate with the user created above and get a CGISESSION id. Use the CGISESSION to add, edit and delete patrons via the API. 5) Use PUT /patrons/ for a patron without borrowers flag. This should go into pending patron modification status and needs to be accepted by a librarian. Please note there is no validation of body input in PUT/POST other than branchcode,category,userid,cardnumber. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Josef Moravecchanged: What|Removed |Added QA Contact||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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added QA Contact|tomasco...@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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #93 from Katrin Fischer--- Tomas, you are still QA contact for this - remove? -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #92 from Tomás Cohen Arazi--- Rebased the patches. Please... Anyone... -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Attachment #70038|0 |1 is obsolete|| --- Comment #91 from Tomás Cohen Arazi --- Created attachment 71671 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71671=edit Bug 16330: Remove validation code from Koha::Patron This patch removes previously added validation code from Koha::Patron as we will rely on the DB structure and relationships to catch the same problems. This is implemented on bug 19828. This patch also adapts the API controller class to expect this behaviour change from Koha::Patron. The expected exceptions are adjusted, and some minor changes take place. The API tests are adjusted as well. To test: - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests should still pass Signed-off-by: Tomas Cohen Arazi -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Attachment #70037|0 |1 is obsolete|| --- Comment #90 from Tomás Cohen Arazi --- Created attachment 71670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71670=edit Bug 16330: (QA follow-up) ModMember requires borrowernumber Works perfectly. Well done everyone! Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Dilan Johnpullé -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Attachment #70036|0 |1 is obsolete|| --- Comment #89 from Tomás Cohen Arazi --- Created attachment 71669 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71669=edit Bug 16330: (QA follow-up) Repect guidelines on plurals Patron > Patrons Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth Signed-off-by: Tomas Cohen Arazi -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Attachment #70035|0 |1 is obsolete|| --- Comment #88 from Tomás Cohen Arazi --- Created attachment 71668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71668=edit Bug 16330: Move patches to OpenAPI This patch refactors the original work so it implements the controllers and the spec using Mojolicious::Plugin::OpenAPI, and OpenAPI for the specification. It removes the ability for patrons without permissions to edit their own data or their guarantee's. This will be moved to a patron modification requests endpoint for simplicity. It makes use of bugs 19410 and 19686 and their dependencies to deal with parameters handling, query building and pagination. Tests are adapted. To test: - Apply this patches and the dependencies - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Attachment #70034|0 |1 is obsolete|| --- Comment #87 from Tomás Cohen Arazi --- Created attachment 71667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71667=edit Bug 16330: Add routes to add, update and delete patrons This patch adds support for add, edit and delete patrons via REST API. GET /api/v1/patrons Get patron list from params GET /api/v1/patrons/ Get single patron POST /api/v1/patrons Create a new patron PUT /api/v1/patrons/ Update data about patron DEL /api/v1/patrons/ Delete a patron Revised Test plan: 1) Apply this patch 2) Run tests perl t/db_dependent/api/v1/patrons.t 3) Add a user with proper rights to use the REST API 4) play with your favourite REST client (curl/httpie, etc.): Authenticate with the user created above and get a CGISESSION id. Use the CGISESSION to add, edit and delete patrons via the API. 5) Use PUT /patrons/ for a patron without borrowers flag. This should go into pending patron modification status and needs to be accepted by a librarian. Please note there is no validation of body input in PUT/POST other than branchcode,category,userid,cardnumber. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Benjamin Rokseth -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 --- Comment #86 from Bob Birchall--- (In reply to Tomás Cohen Arazi from comment #85) > Created attachment 70038 [details] [review] > Bug 16330: Remove validation code from Koha::Patron > > This patch removes previously added validation code from Koha::Patron > as we will rely on the DB structure and relationships to catch the same > problems. This is implemented on bug 19828. > > This patch also adapts the API controller class to expect this behaviour > change from Koha::Patron. The expected exceptions are adjusted, and some > minor changes take place. The API tests are adjusted as well. > > To test: > - Run: > $ kshell > k$ prove t/db_dependent/Koha/Patrons.t > k$ prove t/db_dependent/api/v1/patrons.t > => SUCCESS: Tests should still pass > > Signed-off-by: Tomas Cohen Arazi Is this waiting for extra sign-offs or is it ready for QA? If we (ie Dilan) can help, please let us know. -- 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 16330] Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330 Tomás Cohen Arazichanged: What|Removed |Added Summary|REST API: add routes to |Add routes to add, update |add, update and delete |and delete patrons |patrons | -- 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/