Description
Alex Buckley
2024-02-28 05:26:09 UTC
Created attachment 162524 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the staff client WIP Sponsored-By: The Treasury, New Zealand Created attachment 162525 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the OPAC WIP Sponsored-By: The Treasury, New Zealand Patches written, test plans to come. Not ready for testing yet. Created attachment 162548 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the staff client WIP Sponsored-By: The Treasury, New Zealand Created attachment 162549 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the OPAC WIP Sponsored-By: The Treasury, New Zealand Created attachment 162554 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the staff client When a list is sorted by dateaccessioned it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date accessioned' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates 5. Observe the list records are ordered by the 'Date accessioned' column: - Records with the newest dateaccessioned values displayed first. - The items.dateaccessioned value for each title item record is listed in this column. 6. Switch to order dateaccessioned ascending by clicking on the 'Date accessioned' column label - records with the oldest dateaccessioned should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Created attachment 162555 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the OPAC When a list is sorted by dateaccessioned it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date accessioned' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates 5. In the staff client observe the list records are ordered by the 'Date accessioned' in descending order - i.e. titles with newest dateaccessioned are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date accession (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Patches updated and test plans added. As noted in the commit messages, when sorting by dateaccessioned the order will be descending by default - i.e. titles with newest dateaccessioned will be displayed first. This is different to the default ascending order for all other sort options. This is ready to test. Is there a difference in the way sort is calculated between the staff interface and the OPAC? I'm seeing some differences with my own testing data. I'm wondering if it has to do with how titles with the same dateaccessioned are handled. I'm a little bit concerned about using dateaccessioned for sorting, since ordering search results by date uses other data. I imagine it might also be confusing to users who see a title at the top of the list which isn't new per se, it just has a new copy. (In reply to Owen Leonard from comment #9) > I'm a little bit concerned about using dateaccessioned for sorting Ignore me, I wasn't thinking about the fact that there is already a "Date added" sorting option. I wonder if there is a more user-friendly way to say "Date accessioned?" Some way to express that the order is by newest item? Created attachment 162606 [details]
List sort in the staff interface
Note that I edited one item in each record to have the same dateaccessioned.
Created attachment 162607 [details]
Different list sort in the OPAC
(In reply to Owen Leonard from comment #10) > (In reply to Owen Leonard from comment #9) > > > I'm a little bit concerned about using dateaccessioned for sorting > > Ignore me, I wasn't thinking about the fact that there is already a "Date > added" sorting option. > > I wonder if there is a more user-friendly way to say "Date accessioned?" > Some way to express that the order is by newest item? Hi Owen, Thanks for your feedback and taking a look! Looking at your screenshots now. Do you think 'Date acquired' might be a more helpful wording? Happy to change the wording. Alex (In reply to Alex Buckley from comment #13) > (In reply to Owen Leonard from comment #10) > > (In reply to Owen Leonard from comment #9) > > > > > I'm a little bit concerned about using dateaccessioned for sorting > > > > Ignore me, I wasn't thinking about the fact that there is already a "Date > > added" sorting option. > > > > I wonder if there is a more user-friendly way to say "Date accessioned?" > > Some way to express that the order is by newest item? > > Hi Owen, > > Thanks for your feedback and taking a look! > > Looking at your screenshots now. > > Do you think 'Date acquired' might be a more helpful wording? Happy to > change the wording. > > Alex Looks like 'Date acquired' is used on returns.tt and catalogue_stats.tt and that seems to make sure much sense to me. I tested this and it appears to work when selecting the date accessioned. However, I couldn't sort the list at all when clicking on the sort button for the other columns. Even though I selected the sort order by date accessioned, I would expect to retain the ability to continue to sort the list in different way when viewing. For example, maybe I want the date accessioned to reverse the sort, or maybe I need to sort by call number next. Clicking on the sort icons in the column header does nothing. Testing other tables in Koha, it is possible to click on the sort arrows and have the column sort. In lists, it looks like you have to click on the column name. This is inconsistent behavior, but is perhaps a separate bug. Created attachment 162931 [details] [review] Bug 36188: Sort lists by items.dateaccessioned in the OPAC When a list is sorted by dateaccessioned it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date accessioned' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates 5. In the staff client observe the list records are ordered by the 'Date accessioned' in descending order - i.e. titles with newest dateaccessioned are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date accession (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: esther <esther@bywatersolutions.com> Signing off because this works according to the test plan. I agree that Date Added versus Date Accessioned are a bit confusing. They could mean the same thing, but these dates are pulled from different places. Date Added comes from the bibliographic record (?) and Date accessioned comes from the item record, if I understand the difference. (In reply to Esther Melander from comment #16) > Testing other tables in Koha, it is possible to click on the sort arrows and > have the column sort. In lists, it looks like you have to click on the > column name. This is inconsistent behavior, but is perhaps a separate bug. Lists are one place in Koha that are not yet "DataTable'ed". There is an open bug regarding this: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30031 Created attachment 163100 [details] [review] Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates (952$d subfields) 5. Observe the list records are ordered by the 'Date acquired' column: - Records with the newest date acquired values displayed first. - The date acquired value for each title item record is listed in this column. 6. Switch to order date acquired ascending by clicking on the 'Date acquired' column label - records with the oldest date acquired should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Created attachment 163101 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Hi Lucas, Esther and Owen, I've just attached two amended patches which change the text displayed to 'Date acquired'. Would you mind please taking a look and letting us know if that look alright? Also, Owen would you mind please checking if the sorting is still inconsistent between the OPAC and staff client? Alex The change to Date acquired looks fine. Setting the sort to Date acquired in the list edit screen does seem to sort correctly. I had one bibliographic record with two items with different dates. The list sorted correctly even though the one item was acquired earlier than the other. For example, the top bibliographic record had items with dates acquired that looked like this: 09/04/2014 09/10/2020 The second bibliographic record had an item with this date: 03/17/2016 This sorting is correct since the bibliographic record with the newest item (09/10/2020) is at the top of the list. But is it confusing if the dates themselves are still out of order? Bibliographic records with multiple copies acquired at different times add to the appearance of an incorrect sort. Is there a way to deal with multiple copies acquired at different times. Created attachment 166472 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: baptiste <baptiste.bayche@inlibro.com> The test plan working correctly, But the lists are not exactly the same between the OPAC side and the staff side if the items are the same date acquired. kohadev-koha@kohadevbox:koha((b4054dbb157...))$ git bz apply 36188 Bug 36188 - Allow to sort lists by items.dateaccessioned of item records 163100 - Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client 166472 - Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt M virtualshelves/shelves.pl Falling back to patching base and 3-way merge... Auto-merging virtualshelves/shelves.pl CONFLICT (content): Merge conflict in virtualshelves/shelves.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-36188-Sort-lists-by-Date-acquired-itemsdateacc-450ljhgm.patch Created attachment 172025 [details] [review] Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates (952$d subfields) 5. Observe the list records are ordered by the 'Date acquired' column: - Records with the newest date acquired values displayed first. - The date acquired value for each title item record is listed in this column. 6. Switch to order date acquired ascending by clicking on the 'Date acquired' column label - records with the oldest date acquired should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Created attachment 172026 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: baptiste <baptiste.bayche@inlibro.com> Created attachment 172050 [details] [review] Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates (952$d subfields) 5. Observe the list records are ordered by the 'Date acquired' column: - Records with the newest date acquired values displayed first. - The date acquired value for each title item record is listed in this column. 6. Switch to order date acquired ascending by clicking on the 'Date acquired' column label - records with the oldest date acquired should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Created attachment 172051 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: baptiste <baptiste.bayche@inlibro.com> Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Created attachment 176735 [details] [review] Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates (952$d subfields) 5. Observe the list records are ordered by the 'Date acquired' column: - Records with the newest date acquired values displayed first. - The date acquired value for each title item record is listed in this column. 6. Switch to order date acquired ascending by clicking on the 'Date acquired' column label - records with the oldest date acquired should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 176736 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: baptiste <baptiste.bayche@inlibro.com> Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 176737 [details] [review] Bug 36188: Sort lists by Date acquired (items.dateaccessioned) in the staff client When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. Go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different items.dateaccessioned dates (952$d subfields) 5. Observe the list records are ordered by the 'Date acquired' column: - Records with the newest date acquired values displayed first. - The date acquired value for each title item record is listed in this column. 6. Switch to order date acquired ascending by clicking on the 'Date acquired' column label - records with the oldest date acquired should be displayed first. 7. Edit the list. Change the 'Sort this list by' dropdown to 'Title' 8. Notice the list records are ordered by the 'Title' column in an ascending order - A-Z alphabetically. Sponsored-By: The Treasury, New Zealand Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 176738 [details] [review] Bug 36188: Sort lists by date acquired (items.dateaccessioned) in the OPAC When a list is sorted by date acquired it should be ordered descending by default. This is to ensure the newest items are displayed first. Test plan: 1. Apply patches and restart services 2. In the Staff client, go to the Lists module and create a new list 3. Set the 'Sort this list by' dropdown = 'Date acquired' 4. Add several barcodes to the list belonging to items with a range of different date acquired dates 5. In the staff client observe the list records are ordered by the 'Date acquired' in descending order - i.e. titles with newest date acquired are displayed first 6. In a new browser window navigate to the list in the Koha OPAC 7. Confirm the list titles in the OPAC are ordered in the same order as the staff client 8. In the OPAC click on the 'Sort' button and select 'Date acquired (oldest to newest) 9. Confirm the OPAC list order reverses 10. In the OPAC choose other values from the 'Sort' button and confirm the list is re-sorted correctly Sponsored-By: The Treasury, New Zealand Signed-off-by: baptiste <baptiste.bayche@inlibro.com> Signed-off-by: Olivier V <olivier.vezina@inLibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 176739 [details] [review] Bug 36188: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> |