Bug 27063 - Allow changing which record an order is linked to
Summary: Allow changing which record an order is linked to
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on: 35402 37109
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-20 10:03 UTC by Katrin Fischer
Modified: 2024-11-18 00:31 UTC (History)
3 users (show)

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


Attachments
Bug 27063: Add modal for linking a basket order to a different record (8.07 KB, patch)
2024-06-11 04:53 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Add modal for linking a basket order to a different record (11.29 KB, patch)
2024-06-13 01:43 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: [WIP] Link different record to order from existing records (8.43 KB, patch)
2024-06-13 01:43 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Add modal for linking a basket order to a different record (11.50 KB, patch)
2024-06-17 05:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: [WIP] Link different record to order from existing records (11.79 KB, patch)
2024-06-17 05:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Add modal for linking a basket order to a different record (11.50 KB, patch)
2024-06-18 03:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: [WIP] Link different record to order from existing records (22.75 KB, patch)
2024-06-18 03:54 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Add modal for linking a basket order to a different record (10.74 KB, patch)
2024-06-25 05:26 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Link different record to order from existing records (24.54 KB, patch)
2024-06-25 05:26 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Link different record to order from existing records (25.31 KB, patch)
2024-07-06 01:40 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Allow received orders to also be relinked (3.87 KB, patch)
2024-07-06 02:12 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (6.37 KB, patch)
2024-08-07 03:33 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (6.37 KB, patch)
2024-08-09 02:46 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (6.41 KB, patch)
2024-08-20 02:19 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (6.40 KB, patch)
2024-08-20 02:43 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Add modal for linking a basket order to a different record (10.74 KB, patch)
2024-08-26 03:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Link different record to order from existing records (25.33 KB, patch)
2024-08-26 03:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Allow received orders to also be relinked (3.87 KB, patch)
2024-08-26 03:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (15.09 KB, patch)
2024-08-26 03:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Use Bootstrap 5 syntax for modal (4.02 KB, patch)
2024-08-26 03:52 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement (14.74 KB, patch)
2024-11-18 00:31 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27063: Use Bootstrap 5 syntax for modal (4.02 KB, patch)
2024-11-18 00:31 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-11-20 10:03:14 UTC
At the moment if the basket is still open you can update the bbliographic details of an order or overwrite the existing record via Z39.50, but if you notice that you have used the wrong record, there is no way to fix this.

It would be great if it was possible to change the record an order is linked to while the basket is still open. This should explicitly allow to use a record that is already in the catalog.

--
There is also a use case here for libraries using standing orders for tracking electronic resources such as series. They usually place the order on the series record. When the volumes arrive they'd like to change it so the acq information is tied to the volume. But without using items (which is not the case here for electronic resources), this is not possible.
Comment 1 Aleisha Amohia 2024-06-11 04:53:50 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2024-06-13 01:43:42 UTC Comment hidden (obsolete)
Comment 3 Aleisha Amohia 2024-06-13 01:43:45 UTC Comment hidden (obsolete)
Comment 4 Aleisha Amohia 2024-06-17 05:44:30 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2024-06-17 05:44:33 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2024-06-18 03:54:19 UTC Comment hidden (obsolete)
Comment 7 Aleisha Amohia 2024-06-18 03:54:22 UTC Comment hidden (obsolete)
Comment 8 Aleisha Amohia 2024-06-25 05:26:18 UTC Comment hidden (obsolete)
Comment 9 Aleisha Amohia 2024-06-25 05:26:21 UTC Comment hidden (obsolete)
Comment 10 Aleisha Amohia 2024-07-06 01:40:03 UTC Comment hidden (obsolete)
Comment 11 Aleisha Amohia 2024-07-06 02:12:13 UTC Comment hidden (obsolete)
Comment 12 Aleisha Amohia 2024-08-07 00:53:21 UTC Comment hidden (obsolete)
Comment 13 Aleisha Amohia 2024-08-07 03:33:55 UTC Comment hidden (obsolete)
Comment 14 Aleisha Amohia 2024-08-09 02:46:14 UTC Comment hidden (obsolete)
Comment 15 Michaela Sieber 2024-08-15 16:23:21 UTC
(In reply to Aleisha Amohia from comment #11)
> Created attachment 168572 [details] [review] [review]
> Bug 27063: Allow received orders to also be relinked
> 
> Useful for when the bibliographic records of received orders have been
> deleted, but we want to keep the ordernumber history/invoice data etc.
> 
> To test:
> 
> 1. Add an order to a standing basket
> 2. Receive the order
> 3. Once received, delete the record attached to the order
> 4. Go back to the basket
> 5. Attempt to relink the order with the deleted record
> 6. This should work
> 


This one does not work.

But I do not understand why it is necessary. We already store the biblionumber of the deleted record in the orderline and since Bug 10758 we display the title of this deleted record. So we already keep the ordernumber history/invoice data etc.
Comment 16 Aleisha Amohia 2024-08-20 02:19:50 UTC Comment hidden (obsolete)
Comment 17 Aleisha Amohia 2024-08-20 02:43:58 UTC Comment hidden (obsolete)
Comment 18 Aleisha Amohia 2024-08-26 03:52:16 UTC
Created attachment 170692 [details] [review]
Bug 27063: Add modal for linking a basket order to a different record
Comment 19 Aleisha Amohia 2024-08-26 03:52:19 UTC
Created attachment 170693 [details] [review]
Bug 27063: Link different record to order from existing records

This patch adds the ability to link an order to a different record. This applies to:
* orders in open baskets (not closed)
* unreceived orders in standing baskets

Orders can be linked:
* from an existing record
* from a suggestion
* from a subscription
* from a new (empty) record
* from existing orders (copy)
* from an external source

To test:

1. Apply the patches and restart services
2. Create a normal basket (do not check 'orders are standing'). Add an order to the basket.
3. Notice there is a 'Link to different record' option in the Modify column.
4. Close the basket.
5. Create another basket, this time do check the 'orders are standing' option. Add two orders to the basket.
6. Click 'Link to different record' for one of the orders.
7. Create a suggestion. Create a subscription. Have a MARC record available to stage/import.
8. Loop through each option, linking:
* from an existing record
* from a suggestion
* from a subscription
* from a new (empty) record
* from existing orders (copy)
* from an external source
Make sure that the accounting information is always kept, and just the record details of the order are changed.
9. Go to the vendor page and click 'Receive shipments'. Fill in invoice details.
10. On the receiving page, 'Receive' one of your standing orders. Increment the quantity and finish receiving.
11. Go to the standing basket. Confirm there is no 'Link to different record' option for the received order.

Sponsored-by: Auckland University of Technology
Comment 20 Aleisha Amohia 2024-08-26 03:52:21 UTC
Created attachment 170694 [details] [review]
Bug 27063: Allow received orders to also be relinked

Useful for when the bibliographic records of received orders have been deleted, but we want to keep the ordernumber history/invoice data etc.

To test:

1. Add an order to a standing basket
2. Receive the order
3. Once received, delete the record attached to the order
4. Go back to the basket
5. Attempt to relink the order with the deleted record
6. This should work

Sponsored-by: Auckland University of Technology
Comment 21 Aleisha Amohia 2024-08-26 03:52:24 UTC
Created attachment 170695 [details] [review]
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement

This follow-up patch adds a new system preference KeepInvoiceOnOrderRelink.

When enabled, relinking a received order will keep the invoice ID of the original order.

This is useful for standing orders where the record has been deleted and linked to a new record/order.

To test:

1. Enable the system preference KeepInvoiceOnOrderRelink
2. Add an order to a standing basket
3. Receive the order
4. Once received, go to the record and view the Acquisitions details tab. Notice the invoice is linked.
5. Go back to the basket
6. Relink the received order to a different record
7. Go to the record and view the Acquisitions details tab. Notice the invoice has been kept.
8. Repeat the test plan with the system preference KeepInvoiceOnOrderRelink disabled. Notice the invoice is nullified after the order is relinked.

Sponsored-by: Auckland University of Technology
Comment 22 Aleisha Amohia 2024-08-26 03:52:27 UTC
Created attachment 170696 [details] [review]
Bug 27063: Use Bootstrap 5 syntax for modal
Comment 23 David Nind 2024-10-27 19:43:41 UTC
The patch no longer applies - getting the SHA1/fake ancestor error.

git bz apply 27063

Bug 27063 - Allow changing which record an order is linked to

170692 - Bug 27063: Add modal for linking a basket order to a different record
170693 - Bug 27063: Link different record to order from existing records
170694 - Bug 27063: Allow received orders to also be relinked
170695 - Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement
170696 - Bug 27063: Use Bootstrap 5 syntax for modal

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 27063: Add modal for linking a basket order to a different record
Applying: Bug 27063: Link different record to order from existing records
Applying: Bug 27063: Allow received orders to also be relinked
Applying: Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt).
error: could not build fake ancestor
Patch failed at 0001 Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement
Comment 24 Aleisha Amohia 2024-11-18 00:31:34 UTC
Created attachment 174648 [details] [review]
Bug 27063: Syspref KeepInvoiceOnOrderRelink and implement

This follow-up patch adds a new system preference KeepInvoiceOnOrderRelink.

When enabled, relinking a received order will keep the invoice ID of the original order.

This is useful for standing orders where the record has been deleted and linked to a new record/order.

To test:

1. Enable the system preference KeepInvoiceOnOrderRelink
2. Add an order to a standing basket
3. Receive the order
4. Once received, go to the record and view the Acquisitions details tab. Notice the invoice is linked.
5. Go back to the basket
6. Relink the received order to a different record
7. Go to the record and view the Acquisitions details tab. Notice the invoice has been kept.
8. Repeat the test plan with the system preference KeepInvoiceOnOrderRelink disabled. Notice the invoice is nullified after the order is relinked.

Sponsored-by: Auckland University of Technology
Comment 25 Aleisha Amohia 2024-11-18 00:31:37 UTC
Created attachment 174649 [details] [review]
Bug 27063: Use Bootstrap 5 syntax for modal