Bug 32583

Summary: Restore display of only one item in catalogue/moredetails
Product: Koha Reporter: Michael Hafen <michael.hafen>
Component: Architecture, internals, and plumbingAssignee: Michael Hafen <michael.hafen>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: amaury.gau, jonathan.druart, m.de.rooy
Version: MainKeywords: regression
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31315
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.03
Bug Depends on: 31315    
Bug Blocks: 32585    
Attachments: Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583 - Restore display of only one item in catalogue/moredetails
Bug 32583: Restore display of only one item in catalogue/moredetails

Description Michael Hafen 2023-01-06 21:40:25 UTC
Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits the items displayed to only one item if the itemnumber was passed as a parameter to the page.
This restores that code.
Comment 1 Michael Hafen 2023-01-06 21:45:43 UTC
Created attachment 145109 [details] [review]
Bug 32583 - Restore display of only one item in  catalogue/moredetails

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.
Comment 2 Michael Hafen 2023-01-06 22:36:43 UTC
Created attachment 145111 [details] [review]
Bug 32583 - Restore display of only one item in  catalogue/moredetails

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.
Comment 3 David Nind 2023-01-12 00:28:59 UTC
Created attachment 145227 [details] [review]
Bug 32583 - Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Marcel de Rooy 2023-01-13 09:02:37 UTC
+($itemnumber) and @items = (grep {$_->itemnumber == $itemnumber} @items);


Please change into if statement for clearer code.
Comment 5 Michael Hafen 2023-01-13 17:47:00 UTC
Created attachment 145299 [details] [review]
Bug 32583 - Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.
Comment 6 Michael Hafen 2023-01-13 17:51:07 UTC
Created attachment 145301 [details] [review]
Bug 32583 - Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.
Comment 7 PTFS Europe Sandboxes 2023-01-23 15:38:08 UTC
Created attachment 145585 [details] [review]
Bug 32583 - Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>
Comment 8 Marcel de Rooy 2023-01-27 07:55:07 UTC
Created attachment 145712 [details] [review]
Bug 32583: Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Tomás Cohen Arazi 2023-01-27 19:23:06 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 10 Matt Blenkinsop 2023-01-31 14:28:58 UTC
Nice work everyone!

Pushed to stable for 22.11.x