Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch.
Summary: Make getitems default sort to set by a preference instead of hard coded to ho...
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-11 17:07 UTC by Kyle M Hall
Modified: 2022-06-06 20:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch. (4.93 KB, patch)
2012-12-11 17:10 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch. (4.80 KB, patch)
2013-01-28 14:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch. (5.27 KB, patch)
2014-04-19 02:58 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch. (3.48 KB, patch)
2021-08-10 16:14 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2012-12-11 17:07:42 UTC
This sort order had been switched from home branch to holding branch and then back again at different points in time. Some libraries liked it when it was by holding branch, rather than home branch.
Comment 1 Kyle M Hall 2012-12-11 17:10:24 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2013-01-03 01:52:05 UTC
Hi Kyle, just an easy fix, 

 print "Upgrade to $DBversion done (Bug 9167: Update the virtualshelves.sortfield column with 'copyrightdate' if needed)\n";

You have the wrong message for the updatedatabase (it will need a rebase to apply also)
Comment 3 Kyle M Hall 2013-01-28 14:06:27 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2013-03-19 14:45:54 UTC
(In reply to comment #3)
> 3) Test the sorting order for items with the preference set each way.

This step is a little vague. In order to be thorough what places in Koha should we test? The most obvious choice, detail.pl, can't be properly tested because it has a JS-based tablesorter which overrides default sorting (something which should at the very least be addressed in a follow-up).
Comment 5 I'm just a bot 2013-09-18 11:14:51 UTC
Applying: Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch.
Using index info to reconstruct a base tree...
M	C4/Items.pm
M	installer/data/mysql/sysprefs.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql
Auto-merging C4/Items.pm
Patch failed at 0001 Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch.
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 6 Mark Tompsett 2014-04-19 02:58:57 UTC
Created attachment 27295 [details] [review]
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch.

The sort order in GetItemsInfo has been switched from home branch to holding
branch and then back again at different points in time. Some libraries liked
it when it was by holding branch, rather than home branch.

This patch makes the choice of sorting by home or holding branch a system preference.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Test the sorting order for items with the preference set each way.

NOTE: I only rebased to make it apply. I still think Owen's
      feedback in comment #4 still applys. Hence the move from
      'Patch does not apply' to 'In Discussion'.
Comment 7 Nick Clemens (kidclamp) 2021-08-10 16:14:17 UTC
Created attachment 123705 [details] [review]
Bug 9264 - Make getitems default sort to set by a preference instead of hard coded to homebranch.

The sort order in GetItemsInfo has been switched from home branch to holding
branch and then back again at different points in time. Some libraries liked
it when it was by holding branch, rather than home branch.

This patch makes the choice of sorting by home or holding branch a system preference.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Test the sorting order for items with the preference set each way.

NOTE: I only rebased to make it apply. I still think Owen's
      feedback in comment #4 still applys. Hence the move from
      'Patch does not apply' to 'In Discussion'.
Comment 8 Nick Clemens (kidclamp) 2021-08-10 16:32:49 UTC
(In reply to Owen Leonard from comment #4)
> (In reply to comment #3)
> > 3) Test the sorting order for items with the preference set each way.
> 
> This step is a little vague. In order to be thorough what places in Koha
> should we test? The most obvious choice, detail.pl, can't be properly tested
> because it has a JS-based tablesorter which overrides default sorting
> (something which should at the very least be addressed in a follow-up).

I can't see that this has affect anywhere, most pages are loading a datatables so the sorting is overridden