Bug 31976 - Incorrect default category selected by authorized values page
Summary: Incorrect default category selected by authorized values page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 17:00 UTC by Caroline Cyr La Rose
Modified: 2023-12-28 20:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.08, 21.11.15
Circulation function:


Attachments
Bug 31976: Incorrect default category selected by authorized values page (1.53 KB, patch)
2022-10-26 16:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31976: Incorrect default category selected by authorized values page (1.60 KB, patch)
2022-10-26 16:14 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 31976: Incorrect default category selected by authorized values page (1.65 KB, patch)
2022-10-26 20:23 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 Caroline Cyr La Rose 2022-10-25 17:00:57 UTC
When first accessing the authorized values page, the breadcrumbs say that we are in the AR_CANCELLATION category.

To test:
1. Go to Administration > Authorized values
   --> Breadcrumbs indicate Home / Administration / Authorized values / Authorized values for category AR_CANCELLATION
Comment 1 Caroline Cyr La Rose 2022-10-25 19:11:26 UTC
This bug goes back to at least 22.05. I checked 21.05 and that version is fine. Not sure for 21.11...
Comment 2 Owen Leonard 2022-10-26 15:51:53 UTC
This isn't a template problem, it's a problem with the way the interface behaves in the absence of any search input. The interface use to always show the first authorized value category (alphabetically) instead of showing a table of all categories. A variable is still being passed to the template with this default category which is being picked up by the breadcrumbs.

We don't need the system to pick a category in the absence of a category selection because we want it to list all.
Comment 3 Owen Leonard 2022-10-26 15:52:56 UTC
Bug 31976: Incorrect breadcrumbs in authorised_values.tt main page
Comment 4 Owen Leonard 2022-10-26 16:06:27 UTC Comment hidden (obsolete)
Comment 5 Caroline Cyr La Rose 2022-10-26 16:14:43 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2022-10-26 20:23:14 UTC
Created attachment 142682 [details] [review]
Bug 31976: Incorrect default category selected by authorized values page

This patch removes some obsolete code for selecting a default authorized
value category to be shown when the user first arrives on the authorized
values page. This has not been necessary since we switched to an
interface which lists all categories.

NOTE: This bug will not be reproducible if your first authorized value,
alphabetically, has no values associated with it. For instance, if you
delete all authorized values in the AR_CANCELLATION category.

To test, apply the patch and go to Administration -> Authorized values.

In the breadcrumbs menu you should see "Home -> Administration ->
Authorized values."

Clicking any of the authorized value categories in the list should take
you to a view of that category's values.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Tomás Cohen Arazi (tcohen) 2022-10-27 12:53:01 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 8 Lucas Gass (lukeg) 2022-12-05 23:38:30 UTC
Backported to 22.05.x for upcoming 22.05.08
Comment 9 Arthur Suzuki 2022-12-16 16:07:54 UTC
applied to 21.11 for 21.11.15
Comment 10 Wainui Witika-Park 2023-03-15 01:06:40 UTC
Not backported to 21.05.x