Bug 38331

Summary: Add date accessioned, item lost on, damaged on, withdrawn on, and date last seen columns to itemsearch results
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: SearchingAssignee: Andrew Fuerste-Henry <andrew>
Status: Failed QA --- QA Contact: Victor Grousset/tuxayo <victor>
Severity: enhancement    
Priority: P5 - low CC: andrew, david, hattara, hebah, jonathan.druart, michaela.sieber, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds new columns to the item search results (hidden by default): - dateaccessioned - itemlost_on - damaged_on - withdrawn_on - datelastseen
Version(s) released in:
Circulation function:
Bug Depends on: 37238    
Bug Blocks:    
Attachments: Bug 38331: Add date accessioned column to item search results
Bug 38331: Add date accessioned column to item search results
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results

Description Lucas Gass (lukeg) 2024-11-01 20:21:37 UTC
Now that Bug 37238 is moving we can add some new columns to the itemsearch display that are hidden by default. One that has been requested is  date accessioned.
Comment 1 Lucas Gass (lukeg) 2024-11-01 20:54:40 UTC
Created attachment 173892 [details] [review]
Bug 38331: Add date accessioned column to item search results

To test:
1. APPLY PATCH, restart_all
2. Do an item search, you should not see a 'Date aquired' column.
3. Go to Administration > Table settings.
4. Under catalog find the dateaccessioned column. BY default it should be hidden.
5. Uncheck it to make that column show.
6. Do step 2 again, this time you should see the date accessioned column.
7. Make sure the data in the column is correct.
8. From the top navbar click 'Export all results to', making sure the 'Date aquaied' column is in the CSV.

Note about exporting. With Bug 37238 we now have two ways of exporting files like CSV. Do we want to keep both? The dataTables one is nice because it will only export columns you have exposed.
Comment 2 Biblibre Sandboxes 2024-11-04 14:12:45 UTC
Created attachment 173921 [details] [review]
Bug 38331: Add date accessioned column to item search results

To test:
1. APPLY PATCH, restart_all
2. Do an item search, you should not see a 'Date aquired' column.
3. Go to Administration > Table settings.
4. Under catalog find the dateaccessioned column. BY default it should be hidden.
5. Uncheck it to make that column show.
6. Do step 2 again, this time you should see the date accessioned column.
7. Make sure the data in the column is correct.
8. From the top navbar click 'Export all results to', making sure the 'Date aquaied' column is in the CSV.

Note about exporting. With Bug 37238 we now have two ways of exporting files like CSV. Do we want to keep both? The dataTables one is nice because it will only export columns you have exposed.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 3 Katrin Fischer 2024-11-11 17:36:55 UTC
This was pushed back by bug 37238. Extending deadline to Wednesday.
Comment 4 Katrin Fischer 2024-11-14 14:34:03 UTC
Not going to be in 24.11.00.
Comment 5 Andrew Fuerste-Henry 2024-12-12 14:57:48 UTC
This patch no longer applies. While we're at it, I'm rolling bug 38671 into this one: Let's add dateaccessioned, itemlost_on, damaged_on, and withdrawn_on to the available results columns in item search.
Comment 6 Andrew Fuerste-Henry 2024-12-12 14:58:21 UTC
*** Bug 38671 has been marked as a duplicate of this bug. ***
Comment 7 hebah 2024-12-12 15:15:29 UTC
Heck, let's add datelastseen while we're here!
Comment 8 Andrew Fuerste-Henry 2024-12-12 17:37:51 UTC
Created attachment 175415 [details] [review]
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results

to test:
1 - have items with values in dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen
2 - perform an item search that returns those items
3 - observe these values are not available
4 - apply patch, restart_all
5 - repeat item search, those values still don't show
6 - go to table settings, see dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen are now available to be displayed, but are hidden by default
7 - adjust table settings to show all new fields
8 - repeat search, now you see values!
9 - export results in available formats, confirm new values are in export
Comment 9 Andrew Fuerste-Henry 2024-12-12 17:48:16 UTC
Be aware, filtering on date columns gets confusing if you're using a date format other than YYYY-MM-DD. That issue predates this patch: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38692
Comment 10 Jason Robb 2024-12-12 18:58:00 UTC
Created attachment 175418 [details] [review]
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results

to test:
1 - have items with values in dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen
2 - perform an item search that returns those items
3 - observe these values are not available
4 - apply patch, restart_all
5 - repeat item search, those values still don't show
6 - go to table settings, see dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen are now available to be displayed, but are hidden by default
7 - adjust table settings to show all new fields
8 - repeat search, now you see values!
9 - export results in available formats, confirm new values are in export

Signed-off-by: Jason Robb <jrobb@sekls.org>
Comment 11 Jonathan Druart 2025-02-12 13:15:00 UTC
Created attachment 177855 [details] [review]
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results

to test:
1 - have items with values in dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen
2 - perform an item search that returns those items
3 - observe these values are not available
4 - apply patch, restart_all
5 - repeat item search, those values still don't show
6 - go to table settings, see dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen are now available to be displayed, but are hidden by default
7 - adjust table settings to show all new fields
8 - repeat search, now you see values!
9 - export results in available formats, confirm new values are in export

Signed-off-by: Jason Robb <jrobb@sekls.org>
Comment 12 Jonathan Druart 2025-02-12 13:15:10 UTC
Patch rebased using the auto-rebase script.
Comment 13 Victor Grousset/tuxayo 2025-02-24 21:54:02 UTC
Comment on attachment 177855 [details] [review]
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results

Review of attachment 177855 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc
@@ +50,5 @@
> +"[% item.dateaccessioned | $KohaDates | $raw %]"
> +[%- delimiter | $raw -%]
> +"[% item.itemlost_on | $KohaDates | $raw %]"
> +[%- delimiter | $raw -%]
> +"[% item.damged_on | $KohaDates | $raw %]"

Typo and patch doesn't apply.