[Bug 27947] New: Add cancellation reasons to article requests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Bug ID: 27947 Summary: Add cancellation reasons to article requests Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Similar to holds we propose to add an authorised value list of 'reasons' for cancellation of article requests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |agustinmoyano@theke.io |ity.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #1 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Nick Clemens from comment #0)
Similar to holds we propose to add an authorised value list of 'reasons' for cancellation of article requests
Hi Nick, should we add a default list of reasons? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Agustín Moyano from comment #1)
(In reply to Nick Clemens from comment #0)
Similar to holds we propose to add an authorised value list of 'reasons' for cancellation of article requests
Hi Nick, should we add a default list of reasons?
I think you could use the same defaults as HOLD_CANCELLATION to start: Damaged Not found -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124063 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124063&action=edit Bug 27947: Add authorised values list in article requests cancellation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124064 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124064&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #5 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124065&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. repeat steps 4 to 6 but for /cgi-bin/koha/opac-user.pl#opac-user-article-requests in opac interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #6 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Agustín Moyano from comment #5)
Created attachment 124065 [details] [review] Bug 27947: Add cancellation reason to article request
This bug adds a cancellation reason authorised values to article requests
To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. repeat steps 4 to 6 but for /cgi-bin/koha/opac-user.pl#opac-user-article-requests in opac interface
I added some default authorised values for AR_CANCELLATION, but most probably they should be modified -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hi Agustin, I found a few problems :) [1] Category AR_CANCELLATION has no description. See Admin form. [2] There are no authorized values defined for AR_CANCELLATION ? The dbrev should also add the reasons added to auth_val.yml. [3] There is no longer a possibility to add a custom reason for cancelling (as we had). The default reasons should be additional, not excluding free text. [4] Your request for an article from Learning Perl () has been canceled for the following reason: [blanks] => The selected reason is not mentioned in the notice ! Note that the reason is saved correctly in the database. [5] Why do you add cancel_article_request to Koha/REST/V1/Patrons.pm ? Apart from checking existence of the patron id, what is its use ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #8 from Agustín Moyano <agustinmoyano@theke.io> --- Hi Marcel, (In reply to Marcel de Rooy from comment #7)
Hi Agustin,
I found a few problems :)
[1] Category AR_CANCELLATION has no description. See Admin form.
Ok, I'll add a description right away
[2] There are no authorized values defined for AR_CANCELLATION ? The dbrev should also add the reasons added to auth_val.yml.
In the first attach there are authorised values in auth_val.yml.. I was not sure to add them in atomicupdate, and then I saw HOLDS_CANCELLATION did not add authorised values in the update.
[3] There is no longer a possibility to add a custom reason for cancelling (as we had). The default reasons should be additional, not excluding free text.
Ok, I'll try to restore the way it was... what happens if patron selects a reason, and then adds a custom text?.. which one wins?
[4] Your request for an article from Learning Perl () has been canceled for the following reason: [blanks] => The selected reason is not mentioned in the notice ! Note that the reason is saved correctly in the database.
Ups! I'll check notices
[5] Why do you add cancel_article_request to Koha/REST/V1/Patrons.pm ? Apart from checking existence of the patron id, what is its use ?
As I was making API endpoints for cancelling article requests from staff interface (we should move away from svc in any chance we've got), I thought it would be good to add the same for opac.. the endpoint that opac uses is DELETE /api/v1/public/patrons/{patron_id}/article_requests/{ar_id}, so It seemed natural to place it in Koha/REST/V1/Patrons.pm Cheers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Agustín Moyano from comment #8) Thx for your prompt response.
[3] There is no longer a possibility to add a custom reason for cancelling (as we had). The default reasons should be additional, not excluding free text.
Ok, I'll try to restore the way it was... what happens if patron selects a reason, and then adds a custom text?.. which one wins?
Free text wins from a default text. But you could control that. Disable free text unless they click an option 'Custom reason' or so?
[5] Why do you add cancel_article_request to Koha/REST/V1/Patrons.pm ? Apart from checking existence of the patron id, what is its use ?
As I was making API endpoints for cancelling article requests from staff interface (we should move away from svc in any chance we've got), I thought it would be good to add the same for opac.. the endpoint that opac uses is DELETE /api/v1/public/patrons/{patron_id}/article_requests/{ar_id}, so It seemed natural to place it in Koha/REST/V1/Patrons.pm
I dont really mind. Maybe ask Tomas? But it seemed more logical (or consistent) to me that deleting an article request from OPAC or staff have similar end points. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #10 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Marcel de Rooy from comment #9)
(In reply to Agustín Moyano from comment #8)
Free text wins from a default text. But you could control that. Disable free text unless they click an option 'Custom reason' or so?
Good idea.. I'll do that
[5] Why do you add cancel_article_request to Koha/REST/V1/Patrons.pm ? Apart from checking existence of the patron id, what is its use ?
As I was making API endpoints for cancelling article requests from staff interface (we should move away from svc in any chance we've got), I thought it would be good to add the same for opac.. the endpoint that opac uses is DELETE /api/v1/public/patrons/{patron_id}/article_requests/{ar_id}, so It seemed natural to place it in Koha/REST/V1/Patrons.pm
I dont really mind. Maybe ask Tomas? But it seemed more logical (or consistent) to me that deleting an article request from OPAC or staff have similar end points.
Ok, I'll check with him -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124063|0 |1 is obsolete| | Attachment #124064|0 |1 is obsolete| | Attachment #124065|0 |1 is obsolete| | --- Comment #11 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124849 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124849&action=edit Bug 27947: Add authorised values list in article requests cancellation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #12 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124850 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124850&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #13 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 124851 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124851&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Working on this one now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add cancellation reasons to |Add default cancellation |article requests |reasons to article requests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124849|0 |1 is obsolete| | --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124952&action=edit Bug 27947: Add authorised values list in article requests cancellation Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124850|0 |1 is obsolete| | --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124953&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124851|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124954&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124955&action=edit Bug 27947: (follow-up) Improve atomic update We do not need to replace the whole notice text, we only need to replace the reference to article_requests.notes. Test plan: Run the dbrev. Verify result for notice AR_CANCELED. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 124956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124956&action=edit Bug 27947: (follow-up) Add OPAC cancellation as new reason too Something that currently comes up now already too: If the user cancels from the OPAC page, there is no reason in the notice. We could simply add one now. Test plan: Run dbrev to add the OPAC authval. Create new AR and cancel it from OPAC. Verify notice created for the user. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looks good to me. Added two follow-ups to refine notice update in db rev and to add OPAC cancellation as a new reason. One thing remains (point 5 from comment7): DELETE /public/patrons/{patron_id}/article_requests/{ar_id} DELETE /api/v1/article_requests/{ar_id} => Tomas, please respond. Quoting myself: "But it seemed more logical (or consistent) to me that deleting an article request from OPAC or staff have similar end points." In short: Why not /public/article_requests/{ar_id} ? And out of scope: But why does public not have a version? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Reviewing this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #9)
[5] Why do you add cancel_article_request to Koha/REST/V1/Patrons.pm ? Apart from checking existence of the patron id, what is its use ?
As I was making API endpoints for cancelling article requests from staff interface (we should move away from svc in any chance we've got), I thought it would be good to add the same for opac.. the endpoint that opac uses is DELETE /api/v1/public/patrons/{patron_id}/article_requests/{ar_id}, so It seemed natural to place it in Koha/REST/V1/Patrons.pm
I dont really mind. Maybe ask Tomas? But it seemed more logical (or consistent) to me that deleting an article request from OPAC or staff have similar end points.
I generally prefer context-specific routes, so: /patrons/:patron_id/article_requests/1 over /article_requests/1 in the particular case of the public routes, this allows us to use the 'allow-owner' permission feature from our API framework. What I don't like, is having the controller methods so sparse. I will submit a follow-up reorganizing that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124952|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124953|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124954|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124955|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124956|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124993 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124993&action=edit Bug 27947: Add authorised values list in article requests cancellation Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124994 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124994&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124995&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124996&action=edit Bug 27947: (follow-up) Improve atomic update We do not need to replace the whole notice text, we only need to replace the reference to article_requests.notes. Test plan: Run the dbrev. Verify result for notice AR_CANCELED. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #27 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124997 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124997&action=edit Bug 27947: (follow-up) Add OPAC cancellation as new reason too Something that currently comes up now already too: If the user cancels from the OPAC page, there is no reason in the notice. We could simply add one now. Test plan: Run dbrev to add the OPAC authval. Create new AR and cancel it from OPAC. Verify notice created for the user. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124998 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124998&action=edit Bug 27947: (QA follow-up) Refactor routes This patch refactors the route specs a bit, and also reorganizes code for easier tracking. Unused exceptions that were added earlier are removed for now. A follow-up patch will add tests to this routes. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #29 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 124999 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124999&action=edit Bug 27947: Add regression tests for routes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124993|0 |1 is obsolete| | --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125002 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125002&action=edit Bug 27947: Add authorised values list in article requests cancellation Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124994|0 |1 is obsolete| | --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125003&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124995|0 |1 is obsolete| | --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125004&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124996|0 |1 is obsolete| | --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125005&action=edit Bug 27947: (follow-up) Improve atomic update We do not need to replace the whole notice text, we only need to replace the reference to article_requests.notes. Test plan: Run the dbrev. Verify result for notice AR_CANCELED. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124997|0 |1 is obsolete| | --- Comment #34 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125006&action=edit Bug 27947: (follow-up) Add OPAC cancellation as new reason too Something that currently comes up now already too: If the user cancels from the OPAC page, there is no reason in the notice. We could simply add one now. Test plan: Run dbrev to add the OPAC authval. Create new AR and cancel it from OPAC. Verify notice created for the user. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124998|0 |1 is obsolete| | --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125007&action=edit Bug 27947: (QA follow-up) Refactor routes This patch refactors the route specs a bit, and also reorganizes code for easier tracking. Unused exceptions that were added earlier are removed for now. A follow-up patch will add tests to this routes. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124999|0 |1 is obsolete| | --- Comment #36 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125008&action=edit Bug 27947: Add regression tests for routes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #37 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125009&action=edit Bug 27947: (QA follow-up) Remove incorrect permission check The API was checking for 'reserverforothers' permission, but that doesn't make sense to apply here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #38 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125010&action=edit Bug 27947: (QA follow-up) Update test to highlight issue This addition to the tests highlights a permissions/security check error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Failed QA --- Comment #39 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Sorry guys.. little more needed here. My first followup drops the 'reserveforothers' permission requirement as I don't think that relates to this functionality.. but it makes the API tests fail.. and I can't see why.. code blind on a Friday. My second followup highlights an issue with the public route. Although moving the route under /public/patrons/{patron_id} ensure we do a patron identity check.. there isn't actually a later check anywhere that the article your trying to delete actually belongs to the patron ;) This final one is actually why I preferred the original /article_requests/{request_id} approach.. though of course that would require the addition of a routine to handle checking borrowernumber in the article request against the user as per the other routines for checking allow-owner. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #40 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125016&action=edit Bug 27947: (QA follow-up) Clarify permissions Privileged routes need permissions defined. This patch adds the minimum required permission until there are article request-specific permissions in Koha: circulate: circulate_remaining_permissions It is also clarified that interacting with an article request from another patron, but having your own patron_id in the path would return 404 instead of 403, as technically the resource (an article request from the patron, identified.by the supplied id) doesn't exist. Tests are tweaked. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #41 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #39)
Sorry guys.. little more needed here.
My first followup drops the 'reserveforothers' permission requirement as I don't think that relates to this functionality.. but it makes the API tests fail.. and I can't see why.. code blind on a Friday.
The permissions were wrong. You just missed the fact that privileged routes require at least one permission (catalogue: 1 being the bare minimum). I think we never fixed this: https://gitlab.com/koha-community/qa-test-tools/-/issues/11
My second followup highlights an issue with the public route. Although moving the route under /public/patrons/{patron_id} ensure we do a patron identity check.. there isn't actually a later check anywhere that the article your trying to delete actually belongs to the patron ;)
There's an implicit check by doing: $article_requests = $patron->article_requests->find( $article_request_id ); I clarified this with a comment in the code on the latest patch. I agree with returning 404 there, as 403 would 'leak' the fact that the ID exists... Not sure how important it is, but I think it is correctly tested to avoid security issues.
This final one is actually why I preferred the original /article_requests/{request_id} approach.. though of course that would require the addition of a routine to handle checking borrowernumber in the article request against the user as per the other routines for checking allow-owner.
allow-owner falls short. It feels like with routes with multiple ids in the path we need to think a bit more [1]. I think object 'ownership' validation should be baked into the objects in a declarative way. But that's for another day/bug. [1] I tried adding a validator for article requests in Koha::REST::V1::Auth, but it failed randomly depending on which 'key' was picked first (patron_id vs. article_request_id). It feels like a big refactoring is needed there. Or just keep the patron_id from the path and leave the rest to the controllers, as in this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125002|0 |1 is obsolete| | --- Comment #42 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125038&action=edit Bug 27947: Add authorised values list in article requests cancellation Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125003|0 |1 is obsolete| | --- Comment #43 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125039&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125004|0 |1 is obsolete| | --- Comment #44 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125040&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125005|0 |1 is obsolete| | --- Comment #45 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125041&action=edit Bug 27947: (follow-up) Improve atomic update We do not need to replace the whole notice text, we only need to replace the reference to article_requests.notes. Test plan: Run the dbrev. Verify result for notice AR_CANCELED. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125006|0 |1 is obsolete| | --- Comment #46 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125042&action=edit Bug 27947: (follow-up) Add OPAC cancellation as new reason too Something that currently comes up now already too: If the user cancels from the OPAC page, there is no reason in the notice. We could simply add one now. Test plan: Run dbrev to add the OPAC authval. Create new AR and cancel it from OPAC. Verify notice created for the user. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125007|0 |1 is obsolete| | --- Comment #47 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125043&action=edit Bug 27947: (QA follow-up) Refactor routes This patch refactors the route specs a bit, and also reorganizes code for easier tracking. Unused exceptions that were added earlier are removed for now. A follow-up patch will add tests to this routes. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125008|0 |1 is obsolete| | --- Comment #48 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125044&action=edit Bug 27947: Add regression tests for routes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125009|0 |1 is obsolete| | --- Comment #49 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125045&action=edit Bug 27947: (QA follow-up) Remove incorrect permission check The API was checking for 'reserverforothers' permission, but that doesn't make sense to apply here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125010|0 |1 is obsolete| | --- Comment #50 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125046&action=edit Bug 27947: (QA follow-up) Update test to highlight issue This addition to the tests highlights a permissions/security check error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125016|0 |1 is obsolete| | --- Comment #51 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 125047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125047&action=edit Bug 27947: (QA follow-up) Clarify permissions Privileged routes need permissions defined. This patch adds the minimum required permission until there are article request-specific permissions in Koha: circulate: circulate_remaining_permissions It is also clarified that interacting with an article request from another patron, but having your own patron_id in the path would return 404 instead of 403, as technically the resource (an article request from the patron, identified.by the supplied id) doesn't exist. Tests are tweaked. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #52 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Brill, thanks for the follow-up clarifications Tomas. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |jonathan.druart+koha@gmail. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27945 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27945 [Bug 27945] Limit the number of active article requests per patron category -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #53 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Last rebase after dependency changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125038|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125039|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125040|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125041|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125042|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125043|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125044|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125045|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125046|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125047|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #54 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125165&action=edit Bug 27947: Add authorised values list in article requests cancellation Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #55 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125166&action=edit Bug 27947: [DO NOT PUSH] update ArticleRequest schema Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #56 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125167&action=edit Bug 27947: Add cancellation reason to article request This bug adds a cancellation reason authorised values to article requests To test: 1. apply this patch 2. updatedatabase 3. in staff interface go to /cgi-bin/koha/admin/authorised_values.pl CHECK => AR_CANCELLATION category should appears 4. place several article requests 5. in staff interface go to /cgi-bin/koha/circ/article-requests.pl 6. select multiple requests, or just one and cancel them SUCCESS => a modal pops up offering to select a cancellation reason CHECK => message_queue table has messages with cancellation reason included 7. repeat steps 4 to 6 but for /cgi-bin/koha/circ/request-article.pl 8. cancelling article requests from opac interface should work just as before Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #57 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125168&action=edit Bug 27947: (follow-up) Improve atomic update We do not need to replace the whole notice text, we only need to replace the reference to article_requests.notes. Test plan: Run the dbrev. Verify result for notice AR_CANCELED. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #58 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125169&action=edit Bug 27947: (follow-up) Add OPAC cancellation as new reason too Something that currently comes up now already too: If the user cancels from the OPAC page, there is no reason in the notice. We could simply add one now. Test plan: Run dbrev to add the OPAC authval. Create new AR and cancel it from OPAC. Verify notice created for the user. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #59 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125170&action=edit Bug 27947: (QA follow-up) Refactor routes This patch refactors the route specs a bit, and also reorganizes code for easier tracking. Unused exceptions that were added earlier are removed for now. A follow-up patch will add tests to this routes. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #60 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125171 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125171&action=edit Bug 27947: Add regression tests for routes Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #61 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125172&action=edit Bug 27947: (QA follow-up) Remove incorrect permission check The API was checking for 'reserverforothers' permission, but that doesn't make sense to apply here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #62 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125173&action=edit Bug 27947: (QA follow-up) Update test to highlight issue This addition to the tests highlights a permissions/security check error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #63 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125174&action=edit Bug 27947: (QA follow-up) Clarify permissions Privileged routes need permissions defined. This patch adds the minimum required permission until there are article request-specific permissions in Koha: circulate: circulate_remaining_permissions It is also clarified that interacting with an article request from another patron, but having your own patron_id in the path would return 404 instead of 403, as technically the resource (an article request from the patron, identified.by the supplied id) doesn't exist. Tests are tweaked. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29083 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29083 [Bug 29083] Update article requests-related Koha::Patron methods to use relationships -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29082 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29082 [Bug 29082] Add filtering methods to Koha::ArticleRequests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|29083 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29083 [Bug 29083] Update article requests-related Koha::Patron methods to use relationships -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #64 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- 1. Not blocker, but: - my ( $self, $notes ) = @_; + my ( $self, $cancellation_reason, $notes ) = @_; You should have used a hashref, especially because we have Koha::Hold->cancel that is getting a reason as well: my $cancel_hold = $hold->cancel( { [ charge_cancel_fee => 1||0, ] [ cancellation_reason => $cancellation_reason, ] } ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #65 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I think there is something wrong with the notice.
From the DBrev:
28 $dbh->do(q{ 29 UPDATE letter SET content=REPLACE(content, '<<article_requests.notes>>', '<<reason>>') 30 WHERE module = 'circulation' AND code = 'AR_CANCELED' 31 }); when the installer file is still using notes 233 - "Your request for an article from <<biblio.title>> (<<items.barcode>>) has been canceled for the following reason:" 234 - "" 235 - "<<article_requests.notes>>" By the way, shouldn't we copy the notes to the cancellation_reason when the article request has been canceled? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #66 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125739 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125739&action=edit Bug 27947: (QA follow-up) Make parameters a hashref This patch makes the Koha::ArticleRequest->cancel parameters into a hashref. (Missing) tests are added for those parameters being set as well. Calls to ->cancel are updated. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/ArticleRequest.t \ t/db_dependent/api/v1/article_requests.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #67 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125740&action=edit Bug 27947: (QA follow-up) Fix shipped notice Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 --- Comment #68 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Bug 27947 depends on bug 27945, which changed state. Bug 27945 Summary: Limit the number of active article requests per patron category https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27945 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This feature adds a way to release notes| |define a list of possible | |cancellation reasons for | |article requests. That way, | |they can be chosen upon | |cancellation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27947 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |Caroline Cyr La Rose contact| | CC| |caroline.cyr-la-rose@inlibr | |o.com Keywords| |Manual-updated Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/579 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org