Bug 15184 - Ability to duplicate existing order lines to a given basket
Summary: Ability to duplicate existing order lines to a given basket
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 20366 20661
Blocks: 21205 22390 23927 24733
  Show dependency treegraph
 
Reported: 2015-11-13 09:35 UTC by Katrin Fischer
Modified: 2020-11-30 21:44 UTC (History)
8 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancements adds the ability to add an order to a basket (duplicate) from existing order lines. It will help serials acquisitions or other workflows where the same publication is ordered frequently.
Version(s) released in:


Attachments
Bug 15184: Prepare the ground - Move order search filters (16.70 KB, patch)
2018-07-27 19:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.71 KB, patch)
2018-07-27 19:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.49 KB, patch)
2018-07-27 19:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.27 KB, patch)
2018-07-27 19:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.06 KB, patch)
2018-07-27 19:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (16.74 KB, patch)
2018-08-06 21:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.75 KB, patch)
2018-08-06 21:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.53 KB, patch)
2018-08-06 21:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.31 KB, patch)
2018-08-06 21:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.10 KB, patch)
2018-08-06 21:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (16.78 KB, patch)
2018-08-17 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.79 KB, patch)
2018-08-17 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.57 KB, patch)
2018-08-17 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.33 KB, patch)
2018-08-17 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.15 KB, patch)
2018-08-17 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (16.94 KB, patch)
2018-08-22 00:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.77 KB, patch)
2018-08-22 00:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.53 KB, patch)
2018-08-22 00:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.42 KB, patch)
2018-08-22 00:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.10 KB, patch)
2018-08-22 00:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add POD (1.90 KB, patch)
2018-08-29 18:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.73 KB, patch)
2018-08-29 18:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (16.99 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.83 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.58 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.48 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.15 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add POD (1.90 KB, patch)
2018-08-29 18:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.73 KB, patch)
2018-08-29 18:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.27 KB, patch)
2018-08-31 16:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.27 KB, patch)
2018-09-07 16:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Do not copy items for serials (2.37 KB, patch)
2018-09-07 16:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (920 bytes, patch)
2018-09-07 16:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Do copy items for not a serial OR if items are created on ordering (2.43 KB, patch)
2018-09-07 16:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (920 bytes, patch)
2018-09-07 16:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (16.99 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.83 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.41 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.48 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.15 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add POD (1.90 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.73 KB, patch)
2018-09-14 19:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.27 KB, patch)
2018-09-14 19:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Do copy items for not a serial OR if items are created on ordering (2.43 KB, patch)
2018-09-14 19:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (920 bytes, patch)
2018-09-14 19:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Change permission (+x) on .pl (482 bytes, patch)
2018-09-15 21:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Screenshot of duplcating page (20.64 KB, image/png)
2018-09-15 22:52 UTC, Caroline Cyr La Rose
Details
Bug 15184: Improve styling (7.74 KB, patch)
2018-09-16 16:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Improve styling (7.89 KB, patch)
2018-09-16 17:47 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (17.14 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.97 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.55 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.62 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Add users ? (2.30 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Add POD (2.05 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.88 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.42 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Do copy items for not a serial OR if items are created on ordering (2.57 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (1.04 KB, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Change permission (+x) on .pl (631 bytes, patch)
2018-09-16 17:49 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Improve styling (7.95 KB, patch)
2018-09-16 17:50 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (17.14 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (8.97 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.73 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.57 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add POD (1.43 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.88 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.42 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Do copy items for not a serial OR if items are created on ordering (2.52 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (1.04 KB, patch)
2018-10-12 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Change permission (+x) on .pl (631 bytes, patch)
2018-10-12 14:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Improve styling (7.95 KB, patch)
2018-10-12 14:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Add missing html filters (3.72 KB, patch)
2018-10-15 19:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15184: Fix TT filter (1.30 KB, patch)
2018-10-28 22:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move order search filters (17.20 KB, patch)
2018-10-28 22:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate (9.03 KB, patch)
2018-10-28 22:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Add the ordernumbers filters to GetHistory (2.79 KB, patch)
2018-10-28 22:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Add the ability to duplicate existing order lines (32.62 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Add POD (1.49 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: add missing filters (12.94 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Remove the checkboxes on the last step (2.47 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Do copy items for not a serial OR if items are created on ordering (2.58 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Set created_by to the logged in user (1.10 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Change permission (+x) on .pl (689 bytes, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Improve styling (8.00 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Add missing html filters (3.77 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Fix TT filter (1.36 KB, patch)
2018-10-28 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15184: Fix bad merge conflict with created_by (1.11 KB, patch)
2018-11-08 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-11-13 09:35:57 UTC
In some cases it would be nice if it was possible to duplicate an order easily (serials, databases, etc.).
Comment 1 Séverine Queune 2018-03-09 13:51:04 UTC
The BULAC (http://www.bulac.fr/) would like to sponsor this development !

As long as “Change sponsored?” is set on “Seeking developer”, anyone wanting to quote us for the development of such a feature or just ask for more information is welcome to write to us: <sigb@bulac.fr>.
Comment 2 Jonathan Druart 2018-06-01 16:22:30 UTC
Do we want to create a new basket by duplicating order lines from only one basket, or from several baskets?
Comment 3 Jonathan Druart 2018-06-01 16:30:07 UTC
We can imagine

1. You are on the vendor view (/acqui/supplier.pl?booksellerid=X), click on "New > Duplicate a basket", then you select the order lines you want to duplicate.

or 2. You are on the basket view (/acqui/basket.pl?basketno=X), click "Add to basket > From existing order lines"
Then you get a form/table like the one we have to search order lines (acqui/histsearch.pl), then you select the ones you want to duplicate.

In both case we will have another view to change the values you want to modify.

We could also:
3. You are viewing an existing basket, you click on a "duplicate" link next to one of the orders. Then you select another basket in a list. That sounds less flexible, but could be implemented later
Comment 4 Fanny Mion Mouton 2018-07-02 15:34:12 UTC
At BULAC, we have a preference for the first option : "1. You are on the vendor view (/acqui/supplier.pl?booksellerid=X), click on "New > Duplicate a basket", then you select the order lines you want to duplicate" !

Tanks a lot !
Comment 5 Jonathan Druart 2018-07-27 19:59:04 UTC
Created attachment 77314 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.
Comment 6 Jonathan Druart 2018-07-27 19:59:09 UTC
Created attachment 77315 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.
Comment 7 Jonathan Druart 2018-07-27 19:59:12 UTC
Created attachment 77316 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers
Comment 8 Jonathan Druart 2018-07-27 19:59:16 UTC
Created attachment 77317 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!
Comment 9 Jonathan Druart 2018-07-27 19:59:21 UTC
Created attachment 77318 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?
Comment 10 Jonathan Druart 2018-07-27 20:00:49 UTC
This new feature is ready to be tested!

I have finally change my mind about how this feature is implemented, I hope it will make sense to you too.

As we already have a "add to basket" popup that contain the different ways to add orders to a basket it sounded natural to reuse it.

How does it look:
Click on the add to basket link
https://snag.gy/InG6NH.jpg

Click on "From existing orders (copy)"
https://snag.gy/1sgGw3.jpg

Perform a search
https://snag.gy/hJWbDd.jpg

You can select some orders and redo another search (See "Refine search [+]" to expand the filters form).
If a new search is done, the selected orders will stay selected even if they are not returned by the first request. They are put at the bottom (tfoot) of the table.
https://snag.gy/4ojfHk.jpg

When your selection is done, go to the next screen, to set some default values for these new orders. So far you can set a currency, fund, internal and vendor notes, as well as the two statistic fields. We have here the same form as when adding order from a staged file. We could add more if needed.
There are also checkboxes in front of each field to copy the value from the existing order. If the checkbox is not ticked and that the input is empty, the value will be emptied.
https://snag.gy/rDUH2u.jpg

When you are done, submit the form.
The next screen will display the new orders that have been created and attached to the basket.
https://snag.gy/5MPqIH.jpg


What happened exactly?
The following value of aqorders have been set to default or null:
ordernumber (AI), received_on, datereceived, datecancellationprinted, cancellationreason, purchaseordernumber, claims_count, claimed_date, parent_ordernumber

placed_on and entrydate has been set to today

orderstatus has been set to 'new'
quantityreceived is 0

If items was attached to the order, new ones have been created with the exact same values (expect for barcode that has been removed to avoid collision)

(Q) What about created_by? Should it be copied or set to the logged in user?

(Q) What about users that are on receiving? So far nothing is done (not copied)

(Q) What other fields do we want to batch edit before the duplication is done?

What is still to be done:
- Polish the interface a bit (any suggestions?)
- Add tests for the two new methods added to Koha::Acquisition::Order (add_items and duplicate_to)
Comment 11 Jonathan Druart 2018-07-27 20:02:36 UTC
I have pushed a remote branch to ease testing: https://gitlab.com/joubu/Koha/tree/bug_15184
Comment 12 Jonathan Druart 2018-08-06 21:17:34 UTC
Created attachment 77513 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 13 Jonathan Druart 2018-08-06 21:17:39 UTC
Created attachment 77514 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 14 Jonathan Druart 2018-08-06 21:17:43 UTC
Created attachment 77515 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 15 Jonathan Druart 2018-08-06 21:17:48 UTC
Created attachment 77516 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 16 Jonathan Druart 2018-08-06 21:17:52 UTC
Created attachment 77517 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 17 Josef Moravec 2018-08-16 12:08:25 UTC
There is a cosmetic issue in form for searching 

https://screenshots.firefox.com/FNkRRFxBZKgIwDey/localhost

but overall it looks good
Comment 18 Jonathan Druart 2018-08-16 13:54:39 UTC
(In reply to Josef Moravec from comment #17)
> There is a cosmetic issue in form for searching 
> 
> https://screenshots.firefox.com/FNkRRFxBZKgIwDey/localhost
> 
> but overall it looks good

Hi Josef, thanks for testing!
The misplaced issue you see is not related to this patch, see bug 21223.
Comment 19 Josef Moravec 2018-08-17 06:15:11 UTC
Created attachment 77966 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 20 Josef Moravec 2018-08-17 06:15:16 UTC
Created attachment 77967 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 21 Josef Moravec 2018-08-17 06:15:21 UTC
Created attachment 77968 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 22 Josef Moravec 2018-08-17 06:15:25 UTC
Created attachment 77969 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 23 Josef Moravec 2018-08-17 06:15:29 UTC
Created attachment 77970 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 24 Jonathan Druart 2018-08-22 00:55:39 UTC
Created attachment 78074 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 25 Jonathan Druart 2018-08-22 00:55:45 UTC
Created attachment 78075 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 26 Jonathan Druart 2018-08-22 00:55:50 UTC
Created attachment 78076 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 27 Jonathan Druart 2018-08-22 00:55:56 UTC
Created attachment 78077 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 28 Jonathan Druart 2018-08-22 00:56:02 UTC
Created attachment 78078 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/
Comment 29 Katrin Fischer 2018-08-29 06:32:29 UTC
QA scripts complain about missing POD:
   FAIL	  pod coverage
		POD is missing for add_user
		POD is missing for duplicate_to
		POD is missing for items
		POD is missing for users

This looks a little odd:
+        <label for="fund">Fund: </label>
+        <select name="budget" id="fund">

Wondering about missing |html filters, especially in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt.

Will continue testing - leaving some first notes as I'll have to come back to this later.
Comment 30 Katrin Fischer 2018-08-29 06:33:04 UTC
Also, can you please explain the last patch?

Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?
Comment 31 Katrin Fischer 2018-08-29 06:33:38 UTC
Hm, waiting for the last comment to be answered before more testing.
Comment 32 Jonathan Druart 2018-08-29 18:18:18 UTC
Created attachment 78277 [details] [review]
Bug 15184: Add POD
Comment 33 Jonathan Druart 2018-08-29 18:18:23 UTC
Created attachment 78278 [details] [review]
Bug 15184: add missing filters
Comment 34 Jonathan Druart 2018-08-29 18:23:34 UTC
(In reply to Katrin Fischer from comment #29)
> QA scripts complain about missing POD:
>    FAIL	  pod coverage
> 		POD is missing for add_user
> 		POD is missing for duplicate_to
> 		POD is missing for items
> 		POD is missing for users

Added in the last follow-up.

> This looks a little odd:
> +        <label for="fund">Fund: </label>
> +        <select name="budget" id="fund">

Moved from acqui/histsearch.tt, existed before this patch.

> Wondering about missing |html filters, especially in
> koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt.

Added missing filters in a separate patch.

(In reply to Katrin Fischer from comment #30)
> Also, can you please explain the last patch?
> 
> Bug 15184: Add users ?
> 
> We certainly do not want this patch. What about users that are notified
> on receiving?

When an order is duplicated, do we want to duplicate the user list who were notified on receiving? I.e. they will be notified on receiving items for the duplicated order. I was not sure if it was wanted or not, so I put that code on a separate patch and waited for a feedback.
Comment 35 Jonathan Druart 2018-08-29 18:24:31 UTC
Created attachment 78279 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 36 Jonathan Druart 2018-08-29 18:24:36 UTC
Created attachment 78280 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 37 Jonathan Druart 2018-08-29 18:24:41 UTC
Created attachment 78281 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 38 Jonathan Druart 2018-08-29 18:24:46 UTC
Created attachment 78282 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 39 Jonathan Druart 2018-08-29 18:24:51 UTC
Created attachment 78283 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 40 Jonathan Druart 2018-08-29 18:24:56 UTC
Created attachment 78284 [details] [review]
Bug 15184: Add POD
Comment 41 Jonathan Druart 2018-08-29 18:25:01 UTC
Created attachment 78285 [details] [review]
Bug 15184: add missing filters
Comment 42 Katrin Fischer 2018-08-30 19:33:31 UTC
(In reply to Jonathan Druart from comment #39)
> Created attachment 78283 [details] [review] [review]
> Bug 15184: Add users ?
> 
> We certainly do not want this patch. What about users that are notified
> on receiving?
> 
> Sponsored-by: BULAC - http://www.bulac.fr/
> 
> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Could we make copying the users a checkbox or similar on the copy order form with default off? That way we might get us the best and most flexible behaviour.
Comment 43 Katrin Fischer 2018-08-30 19:47:16 UTC
I quite like the mechanics of this! Some questions:

1) Why another checkbox on the last step? (new from copy > search > select orders > copy order form > more checkboxes)

2) How do you handle items? Does it depend on what was set for the original order or is the setting for the current basket taken into account as well?

3) comment#42
Comment 44 Jonathan Druart 2018-08-31 16:43:36 UTC
Created attachment 78340 [details] [review]
Bug 15184: Remove the checkboxes on the last step
Comment 45 Jonathan Druart 2018-08-31 16:45:47 UTC
(In reply to Katrin Fischer from comment #43)
> I quite like the mechanics of this! Some questions:
> 
> 1) Why another checkbox on the last step? (new from copy > search > select
> orders > copy order form > more checkboxes)

No sense, the last patch removes it.

> 2) How do you handle items? Does it depend on what was set for the original
> order or is the setting for the current basket taken into account as well?

Items are copied, do you think they should only be copied if AcqCreateItem=placing an order?

> 3) comment#42
(In reply to Katrin Fischer from comment #42)
> Could we make copying the users a checkbox or similar on the copy order form
> with default off? That way we might get us the best and most flexible
> behaviour.

I would suggest to either copy them or not, at least for a first step. And give more flexibility on another bug report.
Comment 46 Jonathan Druart 2018-09-07 16:47:31 UTC
Created attachment 78535 [details] [review]
Bug 15184: Remove the checkboxes on the last step
Comment 47 Jonathan Druart 2018-09-07 16:47:36 UTC
Created attachment 78536 [details] [review]
Bug 15184: Do not copy items for serials
Comment 48 Jonathan Druart 2018-09-07 16:47:41 UTC
Created attachment 78537 [details] [review]
Bug 15184: Set created_by to the logged in user
Comment 49 Jonathan Druart 2018-09-07 16:55:01 UTC
Created attachment 78538 [details] [review]
Bug 15184: Do copy items for not a serial OR if items are created on ordering
Comment 50 Jonathan Druart 2018-09-07 16:55:05 UTC
Created attachment 78539 [details] [review]
Bug 15184: Set created_by to the logged in user
Comment 51 Jonathan Druart 2018-09-14 19:00:23 UTC
Created attachment 78697 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 52 Jonathan Druart 2018-09-14 19:00:29 UTC
Created attachment 78698 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 53 Jonathan Druart 2018-09-14 19:00:34 UTC
Created attachment 78699 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 54 Jonathan Druart 2018-09-14 19:00:38 UTC
Created attachment 78700 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 55 Jonathan Druart 2018-09-14 19:00:46 UTC
Created attachment 78701 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 56 Jonathan Druart 2018-09-14 19:00:50 UTC
Created attachment 78702 [details] [review]
Bug 15184: Add POD
Comment 57 Jonathan Druart 2018-09-14 19:00:55 UTC
Created attachment 78703 [details] [review]
Bug 15184: add missing filters
Comment 58 Jonathan Druart 2018-09-14 19:01:01 UTC
Created attachment 78704 [details] [review]
Bug 15184: Remove the checkboxes on the last step
Comment 59 Jonathan Druart 2018-09-14 19:01:06 UTC
Created attachment 78705 [details] [review]
Bug 15184: Do copy items for not a serial OR if items are created on ordering
Comment 60 Jonathan Druart 2018-09-14 19:01:11 UTC
Created attachment 78706 [details] [review]
Bug 15184: Set created_by to the logged in user
Comment 61 Jonathan Druart 2018-09-15 21:00:51 UTC
Created attachment 78898 [details] [review]
Bug 15184: Change permission (+x) on .pl
Comment 62 Caroline Cyr La Rose 2018-09-15 22:52:27 UTC
I find the duplicating page confusing. I figured after a while of looking at it that the checkbox is NOT related to the drop-down/text area next to it. The checkbox copies the original value, whereas the drop-down/text area adds a new value. It's not evident when looking at it since we're used to seeing check boxes next to the things we want.

Furthermore, there is another design element that I find confusing. When I click on the checkbox next to the fund, "The original fund..." appears next to the checkbox for inactive funds, as if it was related to it (see screenshot).
Comment 63 Caroline Cyr La Rose 2018-09-15 22:52:54 UTC
Created attachment 78911 [details]
Screenshot of duplcating page
Comment 64 Caroline Cyr La Rose 2018-09-16 16:16:09 UTC
- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The original..." text
- Add "Check boxes to duplicate the original values" at the top of the blue box
Comment 65 Jonathan Druart 2018-09-16 16:26:29 UTC
Created attachment 78927 [details] [review]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset
Comment 66 Jonathan Druart 2018-09-16 16:27:24 UTC
With the last patch applied: https://snag.gy/uqnkpY.jpg
Comment 67 Séverine Queune 2018-09-16 16:44:23 UTC
The new display seems better to me.
Add a sentence like "To keep the original value, check the box." ?
Comment 68 ByWater Sandboxes 2018-09-16 17:47:41 UTC
Created attachment 78958 [details] [review]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 69 ByWater Sandboxes 2018-09-16 17:49:16 UTC
Created attachment 78959 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 70 ByWater Sandboxes 2018-09-16 17:49:20 UTC
Created attachment 78960 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 71 ByWater Sandboxes 2018-09-16 17:49:23 UTC
Created attachment 78961 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 72 ByWater Sandboxes 2018-09-16 17:49:28 UTC
Created attachment 78962 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 73 ByWater Sandboxes 2018-09-16 17:49:32 UTC
Created attachment 78963 [details] [review]
Bug 15184: Add users ?

We certainly do not want this patch. What about users that are notified
on receiving?

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 74 ByWater Sandboxes 2018-09-16 17:49:35 UTC
Created attachment 78964 [details] [review]
Bug 15184: Add POD

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 75 ByWater Sandboxes 2018-09-16 17:49:39 UTC
Created attachment 78965 [details] [review]
Bug 15184: add missing filters

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 76 ByWater Sandboxes 2018-09-16 17:49:44 UTC
Created attachment 78966 [details] [review]
Bug 15184: Remove the checkboxes on the last step

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 77 ByWater Sandboxes 2018-09-16 17:49:48 UTC
Created attachment 78967 [details] [review]
Bug 15184: Do copy items for not a serial OR if items are created on ordering

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 78 ByWater Sandboxes 2018-09-16 17:49:52 UTC
Created attachment 78968 [details] [review]
Bug 15184: Set created_by to the logged in user

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 79 ByWater Sandboxes 2018-09-16 17:49:56 UTC
Created attachment 78969 [details] [review]
Bug 15184: Change permission (+x) on .pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 80 ByWater Sandboxes 2018-09-16 17:50:02 UTC
Created attachment 78970 [details] [review]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 81 Katrin Fischer 2018-10-11 06:11:16 UTC
Should we leave out the  "Bug 15184: Add users ? (2.30 KB, patch)" for testing this?
Comment 82 Jonathan Druart 2018-10-12 14:03:01 UTC
Created attachment 80485 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 83 Jonathan Druart 2018-10-12 14:03:09 UTC
Created attachment 80486 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 84 Jonathan Druart 2018-10-12 14:03:15 UTC
Created attachment 80487 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 85 Jonathan Druart 2018-10-12 14:03:21 UTC
Created attachment 80488 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 86 Jonathan Druart 2018-10-12 14:03:27 UTC
Created attachment 80489 [details] [review]
Bug 15184: Add POD

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 87 Jonathan Druart 2018-10-12 14:03:34 UTC
Created attachment 80490 [details] [review]
Bug 15184: add missing filters

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 88 Jonathan Druart 2018-10-12 14:03:42 UTC
Created attachment 80491 [details] [review]
Bug 15184: Remove the checkboxes on the last step

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 89 Jonathan Druart 2018-10-12 14:03:48 UTC
Created attachment 80492 [details] [review]
Bug 15184: Do copy items for not a serial OR if items are created on ordering

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 90 Jonathan Druart 2018-10-12 14:03:54 UTC
Created attachment 80493 [details] [review]
Bug 15184: Set created_by to the logged in user

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 91 Jonathan Druart 2018-10-12 14:04:00 UTC
Created attachment 80494 [details] [review]
Bug 15184: Change permission (+x) on .pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 92 Jonathan Druart 2018-10-12 14:04:06 UTC
Created attachment 80495 [details] [review]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 93 Jonathan Druart 2018-10-12 14:04:38 UTC
(In reply to Katrin Fischer from comment #81)
> Should we leave out the  "Bug 15184: Add users ? (2.30 KB, patch)" for
> testing this?

Yes, done.
Comment 94 Katrin Fischer 2018-10-14 12:06:08 UTC
 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt
   FAIL	  filters
		missing_filter at line 284 (        <a class="btn btn-default" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"><i class="fa fa-fw fa-arrow-left"></i> Return to the basket</a)
		missing_filter at line 98 (                [% order.groupname | html %] (<a href="basketgroup.pl?op=add&booksellerid=[% order.id | uri %]&basketgroupid=[% order.basketgroupid %]">[% order.basketgroupid | html %]</a>))
		missing_filter at line 82 (            [% order.ordernumber %])
		missing_filter at line 253 (        <a class="cancel" href="/cgi-bin/koha/acqui/duplicate_orders.pl?basketno=[% basket.basketno %]">Cancel</a>)
		missing_filter at line 114 (        <td><span title="[% order.creationdate %]">[% order.creationdate | $KohaDates %]</span></td>)

Continueing testing!
Comment 95 Jonathan Druart 2018-10-15 19:53:01 UTC
Created attachment 80638 [details] [review]
Bug 15184: Add missing html filters
Comment 96 Katrin Fischer 2018-10-28 22:19:51 UTC
Back to work here.
Comment 97 Katrin Fischer 2018-10-28 22:24:05 UTC
Created attachment 81435 [details] [review]
Bug 15184: Fix TT filter
Comment 98 Katrin Fischer 2018-10-28 22:37:45 UTC
Created attachment 81436 [details] [review]
Bug 15184: Prepare the ground - Move order search filters

We are going to reuse these filters so we move it to a separate include
file.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 99 Katrin Fischer 2018-10-28 22:37:51 UTC
Created attachment 81437 [details] [review]
Bug 15184: Prepare the ground - Move funds and sort fields autoupdate

We are going to reuse the same logic: when a fund is selected the
statistic values are automatically updated.
Let move it to make it reusable more easily and isolate the code.

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 100 Katrin Fischer 2018-10-28 22:37:57 UTC
Created attachment 81438 [details] [review]
Bug 15184: Add the ordernumbers filters to GetHistory

It adds the ability to return the result of GetHistory given a list a
ordernumbers

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 101 Katrin Fischer 2018-10-28 22:38:03 UTC
Created attachment 81439 [details] [review]
Bug 15184: Add the ability to duplicate existing order lines

This patchset adds the ability to duplicate existing order lines to a
given basket. It will help acquisitions of serials of when the same
publication is ordered frequently.

The workflow will be:
- Create a new basket
- Use the "Add to basket" button
- Select the new entry "From existing orders (copy)"
- Search and select the order you want to duplicate
- Define some default values for these orders
- Duplicate!

Sponsored-by: BULAC - http://www.bulac.fr/

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 102 Katrin Fischer 2018-10-28 22:38:08 UTC
Created attachment 81440 [details] [review]
Bug 15184: Add POD

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 103 Katrin Fischer 2018-10-28 22:38:13 UTC
Created attachment 81441 [details] [review]
Bug 15184: add missing filters

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 104 Katrin Fischer 2018-10-28 22:38:19 UTC
Created attachment 81442 [details] [review]
Bug 15184: Remove the checkboxes on the last step

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 105 Katrin Fischer 2018-10-28 22:38:25 UTC
Created attachment 81443 [details] [review]
Bug 15184: Do copy items for not a serial OR if items are created on ordering

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 106 Katrin Fischer 2018-10-28 22:38:33 UTC
Created attachment 81444 [details] [review]
Bug 15184: Set created_by to the logged in user

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 107 Katrin Fischer 2018-10-28 22:38:43 UTC
Created attachment 81445 [details] [review]
Bug 15184: Change permission (+x) on .pl

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 108 Katrin Fischer 2018-10-28 22:38:48 UTC
Created attachment 81446 [details] [review]
Bug 15184: Improve styling

- Move "Show inactive" checkbox closer to the "Show inactive" text.
- Put more space between the "Show inactive" checkbox and the "The
original..." text
- Add "Check boxes to duplicate the original values" at the top of the
fieldset

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 109 Katrin Fischer 2018-10-28 22:38:53 UTC
Created attachment 81447 [details] [review]
Bug 15184: Add missing html filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 110 Katrin Fischer 2018-10-28 22:38:59 UTC
Created attachment 81448 [details] [review]
Bug 15184: Fix TT filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 111 Katrin Fischer 2018-10-28 22:40:02 UTC
Phew.
Comment 112 Nick Clemens 2018-11-08 13:13:10 UTC
Searching for basket created_by is broken, please add a followup
Comment 113 Jonathan Druart 2018-11-08 14:03:36 UTC
Created attachment 82079 [details] [review]
Bug 15184: Fix bad merge conflict with created_by

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 114 Nick Clemens 2018-11-08 18:22:32 UTC
Awesome work all!

Pushed to master for 18.11
Comment 115 Martin Renvoize 2018-11-16 13:56:04 UTC
New Feature, will not be backported to 18.05.x series.
Comment 116 Jonathan Druart 2019-02-21 17:57:36 UTC
I have not provided tests for the two new methods added to Koha::Acquisition::Order (oops!)

It is now done on bug 22390.

Also I think we did something wrong regarding the subscription tests. @BULAC could you take a look at the patch I have just submitted on bug 22390 and told us if you agree with the change?