Bug 27498 - Add a link for the hold ratios to acquisitions home page
Summary: Add a link for the hold ratios to acquisitions home page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Kyle M Hall
URL:
Keywords: Manual
Depends on:
Blocks: 17258
  Show dependency treegraph
 
Reported: 2021-01-20 16:39 UTC by Barbara Johnson
Modified: 2021-12-13 21:14 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a link to the hold ratios report in the Acquisitions sidebar menu under the reports heading.
Version(s) released in:
21.11.00,21.05.02


Attachments
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.42 KB, patch)
2021-02-03 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.48 KB, patch)
2021-02-05 15:02 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.76 KB, patch)
2021-02-09 20:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.82 KB, patch)
2021-03-21 13:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27498: (follow-up) Update to display logic (2.21 KB, patch)
2021-03-21 13:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27498: (follow-up) Update to display logic (2.20 KB, patch)
2021-03-21 13:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.86 KB, patch)
2021-03-24 09:56 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 27498: (follow-up) Update to display logic (2.24 KB, patch)
2021-03-24 09:58 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page (1.98 KB, patch)
2021-05-07 17:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27498: (follow-up) Update to display logic (2.35 KB, patch)
2021-05-07 17:27 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2021-01-20 16:39:56 UTC
In our library viewing the Hold Ratios is more a function of Acquisitions than Circulation. It would be helpful to add a link to the Hold Ratios on the Acquisitions home page so that staff doesn't have to go to the Circulation home page to access.
Comment 1 Andrew Fuerste-Henry 2021-01-20 17:46:23 UTC
It's always confused me that Holds Ratio is in circ. I'd be in favor of moving it to acq entirely.
Comment 2 Owen Leonard 2021-02-03 12:06:06 UTC
Created attachment 116249 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.
Comment 3 PTFS Europe Sandboxes 2021-02-05 15:02:23 UTC
Created attachment 116407 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 4 Barbara Johnson 2021-02-05 15:05:14 UTC
I signed off because the link was where it was supposed to be and it correctly went to the holds ratio page.  I did want to point out that I placed a bunch of holds that should have triggered results in the holds ratio report but did not in case that's an issue.
Comment 5 Katrin Fischer 2021-02-06 22:33:05 UTC
Hi Owen,
I believe the permission check is not quite right. The hold ratios page is asking for circulation_remaining_permissions. Can you please check?
Comment 6 Owen Leonard 2021-02-09 20:24:53 UTC
Created attachment 116616 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.
Comment 7 Barbara Johnson 2021-02-10 18:07:52 UTC
I've tried testing this bug several times in a sandbox and I'm getting an error with the patch applied and even without it applied.  The error starts out with the below statement and then lists 56 specific errors.  I'm unable to test until something gets fixed.  

Plack::App::WrapCGI::call(): DBI Exception: DBD::mysql::st execute failed: 'koha_bug27498.reserves.reservedate' isn't in GROUP BY [for Statement "SELECT reservedate . . . . .
Comment 8 David Nind 2021-02-21 21:21:02 UTC
Can confirm that before the patch is applied on master using koha-testing-docker that there is a system error when clicking on Circulation > Holds ratios.

Tested Koha 20.11.x and it works then, so something has broken it.

The same error is recorded in Bug 21941 but that was created in 2018!

I'm not smart enough to figure out what bug was introduced after 20.11.x that is causing it...
Comment 9 Katrin Fischer 2021-02-22 22:53:54 UTC
The GROUP BY type of error is usually related to using scrict MySQL settings. I'll link it to the omnibus.
Comment 10 Katrin Fischer 2021-03-21 13:12:15 UTC
Created attachment 118565 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2021-03-21 13:12:19 UTC
Created attachment 118566 [details] [review]
Bug 27498: (follow-up) Update to display logic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-03-21 13:14:28 UTC
@David and Barbara I think the problem you are seeing is another bug, not related to this patch. Could you check you see the same error when opening the report from the circulation start page please and make a report if you do?

@Owen I've taken a look and have a suggestion to change up the logic a bit to avoid repeating the link. Could you have a look if you like it?
Comment 13 Katrin Fischer 2021-03-21 13:16:09 UTC
Created attachment 118567 [details] [review]
Bug 27498: (follow-up) Update to display logic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 koha-US bug tracker 2021-03-21 16:38:23 UTC
@Katrin I’m still getting the same error I reported in comment #7 when clicking on the link from the circ start page and the new link from acq home page.
Comment 15 Katrin Fischer 2021-03-21 23:37:57 UTC
(In reply to koha-US bug tracker from comment #14)
> @Katrin I’m still getting the same error I reported in comment #7 when
> clicking on the link from the circ start page and the new link from acq home
> page.

Yes, it means the error is unrelaed - this only adds a link in another spot. We need to file a bug for what you reported in comment#7 separately.

Btw - I don't see it, but I think that just means that my setup is a little different. I suspect a MySQL/MariaDB issue.
Comment 16 Katrin Fischer 2021-03-21 23:41:43 UTC
I realized there already is a report for it that David pointed out: bug 21941
Comment 17 Amit Gupta 2021-03-24 03:21:41 UTC
Not able to apply the second patch

Bug 27498: (follow-up) Update to display logic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: a
Applying: Bug 27498: (follow-up) Update to display logic
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 27498: (follow-up) Update to display logic
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 18 Katrin Fischer 2021-03-24 08:18:31 UTC
Hi Amit, can you make sure your branch is current master? I am not sure why the first woudl apply but the second not. Are you using git bz?
Comment 19 Amit Gupta 2021-03-24 09:56:37 UTC
Created attachment 118709 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.
Comment 20 Amit Gupta 2021-03-24 09:58:06 UTC
Created attachment 118710 [details] [review]
Bug 27498: (follow-up) Update to display logic

Hi Katrin,

Sorry applied one patch only. Now applied both the patches and working fine.

Now giving signoff.

Thank you.
Comment 21 Kyle M Hall 2021-05-07 17:26:26 UTC
Created attachment 120707 [details] [review]
Bug 27498: Add a link for the Hold Ratios to Acquisitions home page

This patch adds a link to the hold ratios report in the Acquisitions
sidebar menu under the "reports" heading.

To test, apply the patch and go to Acquisitions. The link to the hold
ratios report should be there and it should work correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Amit Gupta <amitddng135@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 22 Kyle M Hall 2021-05-07 17:27:21 UTC
Created attachment 120708 [details] [review]
Bug 27498: (follow-up) Update to display logic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Amit Gupta <amitddng135@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 23 Jonathan Druart 2021-06-21 12:03:46 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 24 Kyle M Hall 2021-07-09 11:53:05 UTC
Pushed to 21.05.x for 21.05.02
Comment 25 Fridolin Somers 2021-08-02 20:06:03 UTC
I prefer not impact display on oldstable 20.11.x