Bug 28554 - In itemsearch sort filters by description
Summary: In itemsearch sort filters by description
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
: 27565 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-11 10:27 UTC by Fridolin Somers
Modified: 2021-09-20 11:35 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
For item search in the staff interface the shelving location and item type values are now sorted by the description, rather than the authorized value code.
Version(s) released in:
21.11.00,21.05.04,20.11.10


Attachments
Bug 28554: In Koha::AuthorisedValues sort by description (1.55 KB, patch)
2021-06-11 11:44 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28554: In itemsearch sort item types filter by description (1.14 KB, patch)
2021-06-11 11:44 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28554: In Koha::AuthorisedValues sort by description (1.59 KB, patch)
2021-06-12 22:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 28554: In itemsearch sort item types filter by description (1.19 KB, patch)
2021-06-12 22:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 28554: In Koha::AuthorisedValues sort by description (1.65 KB, patch)
2021-06-14 19:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28554: In itemsearch sort item types filter by description (1.25 KB, patch)
2021-06-14 19:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28554: Fix t/db_dependent/AuthorisedValues.t (3.56 KB, patch)
2021-08-04 08:13 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28554: In Koha::AuthorisedValues sort by description (1.70 KB, patch)
2021-08-04 21:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 28554: In itemsearch sort item types filter by description (1.29 KB, patch)
2021-08-04 21:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 28554: Fix t/db_dependent/AuthorisedValues.t (3.61 KB, patch)
2021-08-04 21:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 28554: In Koha::AuthorisedValues sort by description (1.75 KB, patch)
2021-08-28 12:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28554: In itemsearch sort item types filter by description (1.34 KB, patch)
2021-08-28 12:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28554: Fix t/db_dependent/AuthorisedValues.t (3.65 KB, patch)
2021-08-28 12:11 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-06-11 10:27:03 UTC
In itemsearch form, there are several filters build with authorized values or item types.
There values should be sorted by description.
Comment 1 Fridolin Somers 2021-06-11 11:44:32 UTC
Created attachment 121820 [details] [review]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface
Comment 2 Fridolin Somers 2021-06-11 11:44:48 UTC
Created attachment 121821 [details] [review]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value
Comment 3 Fridolin Somers 2021-06-11 11:45:27 UTC
If needed I will create a unit test
Comment 4 David Nind 2021-06-12 22:20:52 UTC
Created attachment 121891 [details] [review]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2021-06-12 22:20:57 UTC
Created attachment 121892 [details] [review]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Katrin Fischer 2021-06-14 19:49:23 UTC
Created attachment 121935 [details] [review]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-06-14 19:49:27 UTC
Created attachment 121936 [details] [review]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2021-06-21 08:49:47 UTC
One test is failing with those 2 patches applied:

        #   Failed test at t/db_dependent/AuthorisedValues.t line 236.
        #     Structures begin differing at:
        #          $got->[0]{opac_description} = 'opac display value 0'
        #     $expected->[0]{opac_description} = 'opac display value undef'
Comment 9 Fridolin Somers 2021-08-04 08:13:21 UTC
Created attachment 123451 [details] [review]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t

Fixes where sort on lib breaks the test.

Also removes useless params in search_by_koha_field()

Run prove t/db_dependent/AuthorisedValues.t
Comment 10 David Nind 2021-08-04 21:13:14 UTC
Created attachment 123464 [details] [review]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2021-08-04 21:13:19 UTC
Created attachment 123465 [details] [review]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>
Comment 12 David Nind 2021-08-04 21:13:23 UTC
Created attachment 123466 [details] [review]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t

Fixes where sort on lib breaks the test.

Also removes useless params in search_by_koha_field()

Run prove t/db_dependent/AuthorisedValues.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 13 Katrin Fischer 2021-08-28 12:01:28 UTC
*** Bug 27565 has been marked as a duplicate of this bug. ***
Comment 14 Katrin Fischer 2021-08-28 12:10:18 UTC
Also tested for translated item type descriptions. 

Note: you need to have at least one additional language installed.
Comment 15 Katrin Fischer 2021-08-28 12:10:52 UTC
Created attachment 124209 [details] [review]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2021-08-28 12:10:56 UTC
Created attachment 124210 [details] [review]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2021-08-28 12:11:01 UTC
Created attachment 124211 [details] [review]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t

Fixes where sort on lib breaks the test.

Also removes useless params in search_by_koha_field()

Run prove t/db_dependent/AuthorisedValues.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Jonathan Druart 2021-08-30 15:11:46 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 19 Kyle M Hall 2021-09-03 14:47:32 UTC
Pushed to 21.05.x for 21.05.04
Comment 20 Fridolin Somers 2021-09-08 20:29:05 UTC
Pushed to 20.11.x for 20.11.10
Comment 21 Victor Grousset/tuxayo 2021-09-20 11:35:17 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.