Summary: | Purchase suggestions should sort by suggesteddate rather than title | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, jonathan.druart, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31127 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This changes the list of purchase suggestions so that the oldest suggestions are shown first, rather than by title. (This was the behaviour before Koha 20.05).
|
Version(s) released in: |
21.05.00,20.11.04,20.05.10
|
Circulation function: | |||
Bug Depends on: | 16784 | ||
Bug Blocks: | |||
Attachments: |
Bug 27813: Restore default order on suggestion list view
Bug 27813: Restore default order on suggestion list view Bug 27813: Restore default order on suggestion list view Bug 27813: Restore default order on suggestion list view Bug 27813: Restore default order on suggestion list view Bug 27813: Restore default order on suggestion list view Bug 27813: Restore default order on suggestion list view |
Description
Andrew Fuerste-Henry
2021-02-26 18:41:10 UTC
Caused by: commit fb526fb155143a62ea24a8433f58c1c79c1a0179 Bug 16784: Add table configuration on suggestions table Created attachment 117505 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by new suggested date first Andrew, newer first, right? Oh, sorry, I didn't specify. In 19.11, they sort oldest to newest. Created attachment 117555 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by new suggested date first Signed-off-by: David Nind <david@davidnind.com> Testing notes ~~~~~~~~~~~~~ Before applying the patch I couldn't figure out the default order that suggestions were sorting in, it wasn't by date and it wasn't by title. After applying the patch it now sorts by date by default, with the latest suggestions at the top of the list (that is, sorting by date with the latest/newest suggestions first). SQL statements (on koha-testing-docker - koha-mysql kohadev to get into the database): - select * from suggestions; - update suggestions set suggesteddate="YYYY-MM-DD" where suggestionid="#"; - where YYYY-MM-DD is the new date, and # is the suggestionid in the database Created attachment 117934 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by new suggested date first Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Works as intended now, I think newest or oldest is the 'best' order in this case as opposed to the opposite. No regressions and passes QA scripts. Passing QA Andrew, can you confirm you agree with the order? I do not agree with the change in order. We should return to what it did previously (oldest to newest). That's the behavior librarians have come to expect and the behavior folks have specifically asked to return to. An option to change that could be added in a subsequent enhancement if desired. Is it possible to use DataTables functionality like many of our other tables? Then if a different sort order is wanted then this lets staff decide what they want. I'm not sure how difficult this is to setup though... I'm assuming the workflow would be to review the oldest suggestions first, so having them first makes sense to me. Created attachment 118018 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by oldest first Patch modified. (In reply to David Nind from comment #11) > Is it possible to use DataTables functionality like many of our other > tables? Then if a different sort order is wanted then this lets staff decide > what they want. I'm not sure how difficult this is to setup though... You can set a "default sort" column, but it will be "asc" (see Acquisition > basket on admin/columns_settings.pl). There is no way to modify the order (asc/desc). Created attachment 118019 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by oldest first Created attachment 118023 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by oldest first Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Created attachment 118107 [details] [review] Bug 27813: Restore default order on suggestion list view Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by suggesteddate by default. On 20.05 and later, they're sorting by title instead. We should go back to the previous behavior. Test plan: Create some suggestions Edit the suggestions.suggesteddate in the DB List the suggestions and confirm that there are sorted by oldest first Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.04 Pushed to 20.05.x for 20.05.10 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |