[Bug 29168] New: Disable "Request article" links when limit is reached
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Bug ID: 29168 Summary: Disable "Request article" links when limit is reached Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org Since bug 27945 we can limit article request per patron's category. However the "request article" links (detail and search views) are still active. We could disable them and add a tooltip. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Jonathan Druart <jonathan.druart+koha@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=29168 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Are we doing the same for holds now? I think we didnt, we only calculated if we allow when the user clicked further? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org -- 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=29168 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Note that we may not even be able to say if a request is possible. We are doing sort of intelligent guess now. You have biblio and item level requests. You depend on multiple circ rules. Etc. It will be too costly to calculate beforehand? -- 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=29168 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Not a lot of cost for the detail view (and we try to do it for holds on this view). -- 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=29168 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #3)
Not a lot of cost for the detail view (and we try to do it for holds on this view).
True. I had the results view in mind. -- 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=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=29168 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I would suggest to change the title if this is about detail view btw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Disable "Request article" |Only show "Request article" |links when limit is reached |if allowed on the detail | |view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- We can easily hide the link on the search result view in some case (like the limit per category) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 125890 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125890&action=edit Bug 29168: Only show 'Request article' if allowed on the detail view This patch adds a check for the patron being able to place the request, in the case of logged in patron. The anonymous patron will still be displayed the link, and redirected to the login page as required. To test: 1. Set the article request limit to 1 2. Place a request on behalf of a known patron 3. With the patron session, in the OPAC, try to place a new article request from the detail page => SUCCESS: There's no link 4. 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=29168 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=29168 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125890|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 125920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125920&action=edit Bug 29168: Only show 'Request article' if allowed on the detail view This patch adds a check for the patron being able to place the request, in the case of logged in patron. The anonymous patron will still be displayed the link, and redirected to the login page as required. To test: 1. Set the article request limit to 1 2. Place a request on behalf of a known patron 3. With the patron session, in the OPAC, try to place a new article request from the detail page => SUCCESS: There's no link 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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=29168 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 125921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125921&action=edit Bug 29168: (follow-up) Indentation of next code block Indentationt of lines 811-823 directly after changed code corrected. 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=29168 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125921|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Comment on attachment 125921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125921 Bug 29168: (follow-up) Indentation of next code block Not related changes that can cause unnecessary conflicts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #10)
Comment on attachment 125921 [details] [review] Bug 29168: (follow-up) Indentation of next code block
Not related changes that can cause unnecessary conflicts.
Beetje flauw. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Bug 29168 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=29168 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125920|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 127175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127175&action=edit Bug 29168: Only show 'Request article' if allowed on the detail view This patch adds a check for the patron being able to place the request, in the case of logged in patron. The anonymous patron will still be displayed the link, and redirected to the login page as required. To test: 1. Set the article request limit to 1 2. Place a request on behalf of a known patron 3. With the patron session, in the OPAC, try to place a new article request from the detail page => SUCCESS: There's no link 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I expected a big complicated patch and was pleasantly disappointed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This is getting complicated. I think it should be simplified. Isn't the following correct/enough? if ( $patron && $patron->can_request_article ) { $artreqpossible = $biblio->can_article_request( $patron ); } elsif ( $itemtype ) { $artreqpossible = $itemtype->may_article_request } -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #14)
This is getting complicated. I think it should be simplified.
Isn't the following correct/enough?
if ( $patron && $patron->can_request_article ) { $artreqpossible = $biblio->can_article_request( $patron ); } elsif ( $itemtype ) { $artreqpossible = $itemtype->may_article_request }
It looks similar to me, a bit shorter. Do you want me to resubmit the patch in this form? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Shorter and less unnecessary calls in some cases. Yes please resubmit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127175|0 |1 is obsolete| | --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127441 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127441&action=edit Bug 29168: Only show 'Request article' if allowed on the detail view This patch adds a check for the patron being able to place the request, in the case of logged in patron. The anonymous patron will still be displayed the link, and redirected to the login page as required. To test: 1. Set the article request limit to 1 2. Place a request on behalf of a known patron 3. With the patron session, in the OPAC, try to place a new article request from the detail page => SUCCESS: There's no link 4. 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=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** Bug 28360 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #19 from David Nind <david@davidnind.com> --- Created attachment 128251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128251&action=edit Bug 29168 - Error trace when viewing detail in OPAC when logged in When viewing the detail page for a record in the OPAC when logged in I get the error as attached. This is after applying the patch, enabling article requests, but before setting any article request limits. If you are not logged in, the detail page is displayed as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #20 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to David Nind from comment #19)
When viewing the detail page for a record in the OPAC when logged in I get
:-( This was because the `can_article_request` method was renamed on bug 27945. I've fixed that now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29168 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127441|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=29168 --- Comment #21 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 201762 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201762&action=edit Bug 29168: Only show 'Request article' if allowed on the detail view This patch adds a check for the patron being able to place the request, in the case of logged in patron. The anonymous patron will still be displayed the link, and redirected to the login page as required. To test: 1. Set the article request limit to 1 2. Place a request on behalf of a known patron 3. With the patron session, in the OPAC, try to place a new article request from the detail page => SUCCESS: There's no link 4. 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=29168 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128251|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org