Bug 20473

Summary: "Item information" tab should not appear if item is not created upon placing an order
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: AcquisitionsAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: andrew, david, lucas, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: 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
Circulation function:
Attachments: Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items
Bug 20473: Whitespace
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items
Bug 20473: Whitespace
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items
Bug 20473: Whitespace
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items
Bug 20473: Whitespace

Description Caroline Cyr La Rose 2018-03-26 14:25:28 UTC
When ordering from a staged file, and when items are NOT created at that time, the "item information" tab appears even though it is useless in this case.

To reproduce :

- Make sure system preference acqcreateitem is "cataloguing the record" or "receiving an order".
- Make sure you have everything needed to place an order (currency, budget, vendor)

1. Stage a MARC file from Tools > Stage MARC records for import
2. Go to Acquisitions and create a basket for a vendor
3. Add to basket from staged file
4. Note that the "item information" tab is present, if you click on it, not that it is not useful
Comment 1 Nick Clemens (kidclamp) 2022-12-16 12:25:55 UTC
*** Bug 23585 has been marked as a duplicate of this bug. ***
Comment 2 Nick Clemens (kidclamp) 2022-12-16 13:15:20 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2022-12-16 13:15:23 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens (kidclamp) 2022-12-16 14:00:16 UTC Comment hidden (obsolete)
Comment 5 Nick Clemens (kidclamp) 2022-12-16 14:00:20 UTC Comment hidden (obsolete)
Comment 6 David Nind 2022-12-20 01:19:33 UTC
Created attachment 144729 [details] [review]
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items

This patch adds a conditional, and moves another up one level to remove the tab
when it will have no content/effect

To test:
1. Stage a MARC file from Tools > Stage MARC records for import
2. Go to Acquisitions and create a basket for a vendor
3. Add to basket from staged file
4. Note that the "item information" tab is present, if you click on it, not that it is not useful
5. Cancel adding to basket
6. Apply patch
7. Add to basket from the staged file again
8. Confirm there is no item information tab
9. Confirm orders are added on 'Save'

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2022-12-20 01:19:39 UTC
Created attachment 144730 [details] [review]
Bug 20473: Whitespace

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-12-20 01:29:14 UTC
Testing notes (using KTD):

1. For step 2: When adding a basket to a vendor, for 'Create items when' select either 'receiving an order' or 'cataloging the record'.
Comment 9 Katrin Fischer 2023-01-30 22:40:05 UTC
Created attachment 145824 [details] [review]
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items

This patch adds a conditional, and moves another up one level to remove the tab
when it will have no content/effect

To test:
1. Stage a MARC file from Tools > Stage MARC records for import
2. Go to Acquisitions and create a basket for a vendor
3. Add to basket from staged file
4. Note that the "item information" tab is present, if you click on it, not that it is not useful
5. Cancel adding to basket
6. Apply patch
7. Add to basket from the staged file again
8. Confirm there is no item information tab
9. Confirm orders are added on 'Save'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2023-01-30 22:40:11 UTC
Created attachment 145825 [details] [review]
Bug 20473: Whitespace

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi (tcohen) 2023-01-31 14:08:00 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 12 Jacob O'Mara 2023-01-31 18:10:34 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 13 Lucas Gass (lukeg) 2023-02-03 22:16:10 UTC
Doesn't apply cleanly to 22.05.x, no backport.