Bug 34075 - Allow specifying default tab view for authorities
Summary: Allow specifying default tab view for authorities
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 35058
  Show dependency treegraph
 
Reported: 2023-06-21 11:53 UTC by Nick Clemens (kidclamp)
Modified: 2023-12-07 16:04 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/757
Text to go in the release notes:
This enhancement adds a new system preference DefaultAuthorityTab that allows libraries to choose which tab is selected first when viewing an authority record.
Version(s) released in:
23.11.00


Attachments
Bug 34075: Add DefaultAuthorityTab system preference (4.79 KB, patch)
2023-06-21 12:44 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34075: Add DefaultAuthorityTab system preference (5.71 KB, patch)
2023-06-22 19:18 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34075: Add DefaultAuthorityTab system preference (5.75 KB, patch)
2023-06-22 19:42 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 34075: (follow-up) Fixes for QA tool errors (2.13 KB, patch)
2023-06-23 13:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34075: Add DefaultAuthorityTab system preference (5.83 KB, patch)
2023-07-19 07:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34075: (follow-up) Fixes for QA tool errors (2.21 KB, patch)
2023-07-19 07:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34075: Improve JS code (1.88 KB, patch)
2023-07-19 07:32 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-06-21 11:53:49 UTC
Currently the authorities page defaults to the first tab in the record, generally 0XX

Some libraries would like this to default to the 1XX, or other tabs
Comment 1 Nick Clemens (kidclamp) 2023-06-21 12:44:07 UTC
Created attachment 152518 [details] [review]
Bug 34075: Add DefaultAuthorityTab system preference

This patch adds a new system preference, DefaultAuthorityTab.
When set, this will choose the default display on the authorities details
page.

To test:
1 - Apply patch, update database
2 - View an authority detail
3 - You should default to the 0XX or first tab
4 - Set DefaultAuthorityTab to a number that there is no tab for in your authority
5 - Reload and verify details page loads the first tba
6 - Set DefaultAuthorityTab to 1XX or another tab that exists in your record
7 - Reload the details and confirm the correct tab is selected
Comment 2 Owen Leonard 2023-06-22 11:44:49 UTC
I don't see an atomicupdate with this. Should there be?
Comment 3 Nick Clemens (kidclamp) 2023-06-22 19:18:09 UTC
Created attachment 152582 [details] [review]
Bug 34075: Add DefaultAuthorityTab system preference

This patch adds a new system preference, DefaultAuthorityTab.
When set, this will choose the default display on the authorities details
page.

To test:
1 - Apply patch, update database
2 - View an authority detail
3 - You should default to the 0XX or first tab
4 - Set DefaultAuthorityTab to a number that there is no tab for in your authority
5 - Reload and verify details page loads the first tba
6 - Set DefaultAuthorityTab to 1XX or another tab that exists in your record
7 - Reload the details and confirm the correct tab is selected
Comment 4 Nick Clemens (kidclamp) 2023-06-22 19:18:31 UTC
(In reply to Owen Leonard from comment #2)
> I don't see an atomicupdate with this. Should there be?

Woops! Thanks Owen!
Comment 5 Sam Lau 2023-06-22 19:42:03 UTC
Created attachment 152584 [details] [review]
Bug 34075: Add DefaultAuthorityTab system preference

This patch adds a new system preference, DefaultAuthorityTab.
When set, this will choose the default display on the authorities details
page.

To test:
1 - Apply patch, update database
2 - View an authority detail
3 - You should default to the 0XX or first tab
4 - Set DefaultAuthorityTab to a number that there is no tab for in your authority
5 - Reload and verify details page loads the first tba
6 - Set DefaultAuthorityTab to 1XX or another tab that exists in your record
7 - Reload the details and confirm the correct tab is selected

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 6 Owen Leonard 2023-06-23 13:05:52 UTC
Created attachment 152633 [details] [review]
Bug 34075: (follow-up) Fixes for QA tool errors

- Added missing filter to template variable
- Correct spelling in atomicupdate
Comment 7 Jonathan Druart 2023-07-19 07:32:46 UTC
Created attachment 153625 [details] [review]
Bug 34075: Add DefaultAuthorityTab system preference

This patch adds a new system preference, DefaultAuthorityTab.
When set, this will choose the default display on the authorities details
page.

To test:
1 - Apply patch, update database
2 - View an authority detail
3 - You should default to the 0XX or first tab
4 - Set DefaultAuthorityTab to a number that there is no tab for in your authority
5 - Reload and verify details page loads the first tba
6 - Set DefaultAuthorityTab to 1XX or another tab that exists in your record
7 - Reload the details and confirm the correct tab is selected

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2023-07-19 07:32:48 UTC
Created attachment 153626 [details] [review]
Bug 34075: (follow-up) Fixes for QA tool errors

- Added missing filter to template variable
- Correct spelling in atomicupdate

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2023-07-19 07:32:51 UTC
Created attachment 153627 [details] [review]
Bug 34075: Improve JS code

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2023-07-19 07:33:19 UTC
IMO this third patch improves the JS part. Feel free to drop it if you disagree.
Comment 11 Tomás Cohen Arazi 2023-10-10 13:56:20 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 12 Fridolin Somers 2023-10-12 20:59:14 UTC
Enhancement not pushed to 23.05.x