Introduced by bug 29082, and covered by tests, we should use those higher level methods instead of crafting queries in-place.
Created attachment 125175 [details] [review] Bug 29086: Simplify querying active article requests This patch makes a trivial replacement of a query for a higher level method that does the same query. To test: 1. Enable the ArticleRequests feature 2. Place some article requests on known biblios 3. Have some article requests be active on others finished (either completed or cancelled) 4. Go to the detail page for those records => SUCCESS: The active article requests count is correct! 5. Sign off :-D
Created attachment 125176 [details] [review] Bug 29086: (follow-up) Remove unrequired Koha::ArticleRequest::Status uses I noticed a couple places in which this library was included but not used. To test: 1. Apply this patch 2. Run: $ git grep 'Koha::ArticleRequest::Status' => SUCCESS: There aren't any calls to their defined constants in Biblio.pm or Patrons.pm 3. Sign off :-D
Everything worked fine in the staff interface. However, in the OPAC no items are shown for the patron (Your account > Your summary > Article requests tab (has no number in (), and not items listed. This may be one of the dependcies causing this... Testing notes: - remember to run updatedatabase (for other dependencies)
(In reply to David Nind from comment #3) > Everything worked fine in the staff interface. > > However, in the OPAC no items are shown for the patron (Your account > Your > summary > Article requests tab (has no number in (), and not items listed. > This may be one of the dependcies causing this... > > Testing notes: > - remember to run updatedatabase (for other dependencies) Thanks for testing! Will check it ASAP.
(In reply to Tomás Cohen Arazi from comment #4) > (In reply to David Nind from comment #3) > > Everything worked fine in the staff interface. > > > > However, in the OPAC no items are shown for the patron (Your account > Your > > summary > Article requests tab (has no number in (), and not items listed. > > This may be one of the dependcies causing this... > > > > Testing notes: > > - remember to run updatedatabase (for other dependencies) > > Thanks for testing! Will check it ASAP. Solved, on bug 29083.
Created attachment 125246 [details] [review] Bug 29086: Simplify querying active article requests This patch makes a trivial replacement of a query for a higher level method that does the same query. To test: 1. Enable the ArticleRequests feature 2. Place some article requests on known biblios 3. Have some article requests be active on others finished (either completed or cancelled) 4. Go to the detail page for those records => SUCCESS: The active article requests count is correct! 5. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 125247 [details] [review] Bug 29086: (follow-up) Remove unrequired Koha::ArticleRequest::Status uses I noticed a couple places in which this library was included but not used. To test: 1. Apply this patch 2. Run: $ git grep 'Koha::ArticleRequest::Status' => SUCCESS: There aren't any calls to their defined constants in Biblio.pm or Patrons.pm 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, signing off
Created attachment 125347 [details] [review] Bug 29086: Simplify querying active article requests This patch makes a trivial replacement of a query for a higher level method that does the same query. To test: 1. Enable the ArticleRequests feature 2. Place some article requests on known biblios 3. Have some article requests be active on others finished (either completed or cancelled) 4. Go to the detail page for those records => SUCCESS: The active article requests count is correct! 5. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 125348 [details] [review] Bug 29086: (follow-up) Remove unrequired Koha::ArticleRequest::Status uses I noticed a couple places in which this library was included but not used. To test: 1. Apply this patch 2. Run: $ git grep 'Koha::ArticleRequest::Status' => SUCCESS: There aren't any calls to their defined constants in Biblio.pm or Patrons.pm 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note that the dependency needs a fix.
Pushed to master for 21.11, thanks to everybody involved!