Bug 20098

Summary: Inventory: CSV export: itemlost column is always empty
Product: Koha Reporter: Victor Grousset/tuxayo <victor>
Component: ToolsAssignee: Victor Grousset/tuxayo <victor>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: chris, fridolin.somers, gwendal.joncour, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20098: Inventory tool: CVS export: fix itemlost column
Bug 20098: Inventory tool: CVS export: fix itemlost column
Bug 20098: Inventory tool: CVS export: fix itemlost column
Bug 20098: Inventory tool: CVS export: fix itemlost column

Description Victor Grousset/tuxayo 2018-01-29 14:49:40 UTC
It's mapped with the name "lost" instead of "itemlost"

== Reproduce ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the bug
Comment 1 Victor Grousset/tuxayo 2018-01-29 15:22:22 UTC
Created attachment 71023 [details] [review]
Bug 20098: Inventory tool: CVS export: fix itemlost column

It was mapped with "lost" instead of "itemlost".

== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the bug
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
      expected values.
14. Smile because it works! :D
Comment 2 Mark Tompsett 2018-01-30 20:30:28 UTC
Created attachment 71075 [details] [review]
Bug 20098: Inventory tool: CVS export: fix itemlost column

It was mapped with "lost" instead of "itemlost".

== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the problem
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
      expected values.
14. Smile because it works! :D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Maksim Sen 2018-02-02 19:34:41 UTC
Created attachment 71166 [details] [review]
Bug 20098: Inventory tool: CVS export: fix itemlost column

It was mapped with "lost" instead of "itemlost".

== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the problem
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
      expected values.
14. Smile because it works! :D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Comment 4 Katrin Fischer 2018-02-04 11:55:45 UTC
Created attachment 71173 [details] [review]
Bug 20098: Inventory tool: CVS export: fix itemlost column

It was mapped with "lost" instead of "itemlost".

== Test plan ==
1. Have a lost item
2. Go to staff:/cgi-bin/koha/tools/inventory.pl
3. Tick "Optional filters" → "items.itemlost" →
      "name of Authorized values for the lost state"
4. Tick "Export to CSV file"
5. Submit
6. Open the CSV
7. Check that the lost item is in the list
8. You should observe that the "Lost status" column is empty for all items
     This is the problem
9. Apply this patch
10. Click submit to re-export the CSV
11. Open the CSV
12. Check that the lost item is in the list
13. You should observe that the "Lost status" column now filled with the
      expected values.
14. Smile because it works! :D

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2018-02-05 13:00:46 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 6 Nick Clemens 2018-02-16 02:30:41 UTC
Awesome work all, pushed to stable for 17.11.03
Comment 7 Gwendal JONCOUR 2018-03-12 10:54:52 UTC
Hi, we encounter this bug on our 16.11 instance. Is this patch will be pushed to 16.11 ?
Comment 8 Fridolin Somers 2018-03-12 15:17:41 UTC
Pushed to 17.05.x for v17.05.10
Comment 9 Victor Grousset/tuxayo 2018-03-12 15:32:00 UTC
@Gwendal I just CC-ed this bug to Chris, the maintainer of the 16.11 branch so he will be able to judge if this could be backported.