Bug 22135

Summary: Inventory tool doesn't export "out of order" problem to CSV
Product: Koha Reporter: Mark Alexander <marka>
Component: ToolsAssignee: Katrin Fischer <katrin.fischer>
Status: RESOLVED FIXED QA Contact: Kyle M Hall <kyle>
Severity: minor    
Priority: P5 - low CC: david, dcook, fridolin.somers, kyle, lisette.scheer
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the export of inventory results when "Check barcodes list for items shelved out of order" is selected. Currently, the problem column is blank for items shelved out of order when it should be "Shelved out of order".
Version(s) released in:
23.11.00,23.05.04,22.11.10
Bug Depends on: 21408    
Bug Blocks: 33856    
Attachments: Fix for out of order problem seen as blank in CSV exported by inventory tool
Bug 22135: Display 'shelved out of order' error in inventory CSV export
Bug 22135: Display 'shelved out of order' error in inventory CSV export
Bug 22135: Display 'shelved out of order' error in inventory CSV export
Bug 22135: Display 'shelved out of order' error in inventory CSV export

Description Mark Alexander 2019-01-15 20:51:57 UTC
Created attachment 84013 [details] [review]
Fix for out of order problem seen as blank in CSV exported by inventory tool

When using the inventory tool with an uploaded barcode file and checking the "Compare barcodes list to results", "Check barcodes list for items shelved out of order" and "Export to CSV file" checkboxes, the resulting CSV file shows a blank in the "problem" column for items with out of order callnumbers.

I was able to fix this using the attached patch.
Comment 1 Katrin Fischer 2023-05-29 15:45:55 UTC
Created attachment 151778 [details] [review]
Bug 22135: Display 'shelved out of order' error in inventory CSV export

When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".

To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"

Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.
Comment 2 Katrin Fischer 2023-05-29 15:47:57 UTC
Created attachment 151779 [details] [review]
Bug 22135: Display 'shelved out of order' error in inventory CSV export

When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".

To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"

Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.

Co-authored-by: Mark Alexander <marka@pobox.com>
Comment 3 Katrin Fischer 2023-05-29 15:49:08 UTC
Realized too late that there was already an incomplete patch file from Mark, so I added him as a co-author. We ended up with the same solution :)
Comment 4 David Nind 2023-06-01 22:31:34 UTC
Created attachment 151955 [details] [review]
Bug 22135: Display 'shelved out of order' error in inventory CSV export

When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".

To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"

Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.

Co-authored-by: Mark Alexander <marka@pobox.com>
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Kyle M Hall 2023-09-01 17:17:46 UTC
Created attachment 155140 [details] [review]
Bug 22135: Display 'shelved out of order' error in inventory CSV export

When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".

To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"

Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.

Co-authored-by: Mark Alexander <marka@pobox.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-09-05 17:37:48 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-09-08 06:49:29 UTC
Pushed to 23.05.x for 23.05.04
Comment 8 Matt Blenkinsop 2023-09-15 09:33:31 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x