Summary: | Log viewer not displaying item renewals | ||
---|---|---|---|
Product: | Koha | Reporter: | Barry Cannon <barry.cannon> |
Component: | Tools | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | axel.amghar, lisettepalouse+koha, lucas, martin.renvoize, nick, wizzyrea |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch fixes the search for 'renewal', so both item renewals and patron renewals are found.
|
Version(s) released in: |
19.05.00, 18.11.05
|
Circulation function: | |||
Bug Depends on: | 22363 | ||
Bug Blocks: | |||
Attachments: |
Bug 22069: Make log viewer find item renewals
Bug 22069: Make log viewer find item renewals Bug 22069: (QA Follow-up) Fix other cases Bug 22069: Make log viewer find item renewals Bug 22069: Make log viewer find item renewals Bug 22069: Make log viewer find item renewals Bug 22069: Make log viewer find item renewals |
Description
Barry Cannon
2019-01-04 13:18:07 UTC
The problem is that we have membership renewals that log with RENEW and item renewals that log as RENEWAL, trying to work out a fix. Created attachment 87486 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Circulation and Renew are selected in the form. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected Hello, I tested the patch, and he doesn't work. When I tested the different searches, - Modules All - Actions All works - Modules All - Actions Renew return No log found - Modules All - Actions Renew return No log found because you forgot parentheses around the grep: if ( (grep { $_ eq 'CIRCULATION'} @modules) && (grep { $_ eq 'RENEW'} @actions) ) { push @actions, 'RENEWAL'; } But i tkink a better solution will be to change the value in the form: In the actions label replace <option value="RENEW">Renew</option> by <option value="RENEWAL">Renew</option> and the patch will work. (In reply to axel from comment #3) > Hello, > I tested the patch, and he doesn't work. > When I tested the different searches, > - Modules All - Actions All works > - Modules All - Actions Renew return No log found > > - Modules Circulation - Actions Renew return No log found > because you forgot parentheses around the grep: > > if ( (grep { $_ eq 'CIRCULATION'} @modules) && (grep { $_ eq 'RENEW'} > @actions) ) { > push @actions, 'RENEWAL'; > } > > > But i tkink a better solution will be to change the value in the form: > > In the actions label > replace <option value="RENEW">Renew</option> > by <option value="RENEWAL">Renew</option> > > and the patch will work. When you add the parentheses, this will only resolve the research "- Modules Circulation - Actions Renew" I encourage you to apply the last solution because all the case will works Axel, it sadly won't work because then you won't be able to find Membership renewals - Module Patrons > Renw. We have both in the database, RENEW and RENEWAL for different modules. Created attachment 87645 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Circulation and Renew are selected in the form. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected Created attachment 87646 [details] [review] Bug 22069: (QA Follow-up) Fix other cases Same test plan as original patch. :) Created attachment 87647 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Circulation and Renew are selected in the form. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected Signed-off-by: Liz Rea <wizzyrea@gmail.com> Created attachment 87648 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Renew was selected in the form, so both terms are included in the query. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected I've changed the patch slightly, thx for testing! I've also added a code comment to make things clearer. Created attachment 87649 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Renew was selected in the form, so both terms are included in the query. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected Signed-off-by: Liz Rea <wizzyrea@gmail.com> Created attachment 87958 [details] [review] Bug 22069: Make log viewer find item renewals Without this patch renewals for checkouts wouldn't show in the log viewer. The log viewre was using RENEW, which we use for patrons, but for issue RENEWAL is used. The patch adds RENEWAL to the search params, when Renew was selected in the form, so both terms are included in the query. To test: - Make sure you have RenewalLog turned on - Make a patron renewal - Check something out and renew it - Go to Tools > Log viewer and test different searches - Modules All - Actions All - Modules All - Actions Renew - Modules Circulation - Actions Renew ... - Make sure results show as expected Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Awesome work all! Pushed to master for 19.05 Re-implemented for 18.11.x series as we don't have the refactor that took place in bug 22363. Pushed to 18.11.x for 18.11.05 not backporting to 18.05.x |