Bug 21511 - Don't show acquisition details on subscription detail when there is no acq data
Summary: Don't show acquisition details on subscription detail when there is no acq data
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 21523
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-06 20:10 UTC by Katrin Fischer
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data (2.42 KB, patch)
2018-10-09 17:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data (2.48 KB, patch)
2018-10-11 20:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data (2.53 KB, patch)
2018-10-11 22:21 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 21511: (RM follow-up) Use orders.count instead of new variable (1.75 KB, patch)
2018-10-23 13:17 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-10-06 20:10:52 UTC
I think it would be nicer, especially for libraries not using the acquisition modle, if the acquisition information on the subscription detail page only showed when there is data to display.
Comment 1 Owen Leonard 2018-10-09 16:36:29 UTC
I think it would also be more consistent to put the information in a separate tab.
Comment 2 Owen Leonard 2018-10-09 17:29:54 UTC
Created attachment 80301 [details] [review]
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data

This patch modifies the subscription detail page so that acquisitions
details section is not shown when there is no acquisitions data.

The acquisitions details are moved into a new tab similar to how it
appears on the bibliographic details page. A count of orders is now
passed to the template so that the check for existing acquisitions data
will work correctly.

To test, apply the patch and view the detail page for subscriptions.

- When viewing a subscription for which there are orders you should see
  an "Acquisitions details" tab containing the acquisitions data.
- When viewing a subscription with no orders the tab should not appear.
Comment 3 Katrin Fischer 2018-10-11 20:14:16 UTC
Created attachment 80424 [details] [review]
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data

This patch modifies the subscription detail page so that acquisitions
details section is not shown when there is no acquisitions data.

The acquisitions details are moved into a new tab similar to how it
appears on the bibliographic details page. A count of orders is now
passed to the template so that the check for existing acquisitions data
will work correctly.

To test, apply the patch and view the detail page for subscriptions.

- When viewing a subscription for which there are orders you should see
  an "Acquisitions details" tab containing the acquisitions data.
- When viewing a subscription with no orders the tab should not appear.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Chris Cormack 2018-10-11 22:21:35 UTC
Created attachment 80438 [details] [review]
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data

This patch modifies the subscription detail page so that acquisitions
details section is not shown when there is no acquisitions data.

The acquisitions details are moved into a new tab similar to how it
appears on the bibliographic details page. A count of orders is now
passed to the template so that the check for existing acquisitions data
will work correctly.

To test, apply the patch and view the detail page for subscriptions.

- When viewing a subscription for which there are orders you should see
  an "Acquisitions details" tab containing the acquisitions data.
- When viewing a subscription with no orders the tab should not appear.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 5 Nick Clemens (kidclamp) 2018-10-23 13:17:28 UTC
Created attachment 81022 [details] [review]
Bug 21511: (RM follow-up) Use orders.count instead of new variable
Comment 6 Nick Clemens (kidclamp) 2018-10-23 13:18:17 UTC
Owen, can you confirm this follow up works for you? removes the need to add an additional parameter to the template
Comment 7 Nick Clemens (kidclamp) 2018-10-24 17:33:59 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize (ashimema) 2018-11-06 10:59:13 UTC
The bug half of this (acq fields showing when empty) isn't apparent in 18.05.x series.. the pushing to a tab is an enhancement.