Bug 31463 - (Bug 31313 follow-up) Show item order status on opac-detail
Summary: (Bug 31313 follow-up) Show item order status on opac-detail
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 31313
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-25 13:12 UTC by Nick Clemens
Modified: 2023-12-28 20:42 UTC (History)
5 users (show)

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


Attachments
Bug 31463: Add order status to opac-detail.pl (3.20 KB, patch)
2022-08-25 13:17 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31463: Add order status to opac-detail.pl (3.21 KB, patch)
2022-08-31 09:31 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31463: Add order status to opac-detail.pl (3.41 KB, patch)
2022-08-31 16:50 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31463: Add order status to opac-detail.pl (3.50 KB, patch)
2022-09-30 09:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 31463: (QA follow-up) Remove obsolete comment (1.16 KB, patch)
2022-09-30 09:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-08-25 13:12:32 UTC

    
Comment 1 Nick Clemens 2022-08-25 13:17:14 UTC
Created attachment 139796 [details] [review]
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message
Comment 2 Andrew Fuerste-Henry 2022-08-26 20:29:26 UTC
Looks like this didn't apply correctly?

When I try to view opac-detail for any bib I get:
Could not compile /kohadevbox/koha/opac/opac-detail.pl: Version control conflict marker at /kohadevbox/koha/opac/opac-detail.pl line 723, near "<<<<<<<"
Version control conflict marker at /kohadevbox/koha/opac/opac-detail.pl line 727, near "======="
Version control conflict marker at /kohadevbox/koha/opac/opac-detail.pl line 739, near ">>>>>>>"
BEGIN not safe after errors--compilation aborted at /kohadevbox/koha/opac/opac-detail.pl line 1261.
 at /usr/share/perl5/CGI/Compile.pm line 144
Comment 3 Nick Clemens 2022-08-31 09:31:38 UTC
Created attachment 139996 [details] [review]
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message
Comment 4 Joonas Kylmälä 2022-08-31 16:50:56 UTC
Created attachment 140010 [details] [review]
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message

JK: Remove unused @itemnumbers_on_order variable
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 5 Marcel de Rooy 2022-09-30 09:30:42 UTC
Created attachment 141112 [details] [review]
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message

JK: Remove unused @itemnumbers_on_order variable
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2022-09-30 09:30:47 UTC
Created attachment 141113 [details] [review]
Bug 31463: (QA follow-up) Remove obsolete comment

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Tomás Cohen Arazi 2022-10-03 11:50:17 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 8 Caroline Cyr La Rose 2023-05-05 20:40:44 UTC
Not sure what needs documenting here, it seems like backend changes.