Bug 30025 - Split BiblioAddsAuthorities into 2 preferences
Summary: Split BiblioAddsAuthorities into 2 preferences
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-04 14:58 UTC by Nick Clemens (kidclamp)
Modified: 2024-03-17 21:54 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/665
Text to go in the release notes:
This patch splits the system preference BiblioAddsAuthorities into two new system preferences that more clearly define what the settings do: 1- RequireChoosingExistingAuthority: this preference indicates whether a cataloger must choose from existing authorities, or if they can enter free text into controlled fields 2- AutoLinkBiblios: this preference determines whether Koha will attempt to link a new record to existing authorities upon saving. In conjunction with the existing preference, AutoCreateAuthorities, unmatched headings will either be linked to a new authority, or remain uncontrolled
Version(s) released in:
22.11.00


Attachments
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.46 KB, patch)
2022-05-26 16:19 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: DB update (1.62 KB, patch)
2022-06-10 12:10 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.46 KB, patch)
2022-07-01 11:39 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: DB update (1.62 KB, patch)
2022-07-01 11:39 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.46 KB, patch)
2022-07-06 17:53 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (2.65 KB, patch)
2022-07-06 17:53 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 30025: DB update (1.62 KB, patch)
2022-08-16 11:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.53 KB, patch)
2022-08-16 11:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority (15.53 KB, patch)
2022-08-16 11:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority (15.55 KB, patch)
2022-08-18 15:18 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 30025: DB update (1.67 KB, patch)
2022-08-19 15:58 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.58 KB, patch)
2022-08-19 15:58 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority (15.60 KB, patch)
2022-08-19 15:58 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 30025: DB update (1.67 KB, patch)
2022-09-12 15:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.58 KB, patch)
2022-09-12 15:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority (15.60 KB, patch)
2022-09-12 15:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30025: DB update (1.73 KB, patch)
2022-09-12 15:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30025: Split BiblioAddsAuthorities into two sysprefs (20.64 KB, patch)
2022-09-12 15:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority (15.66 KB, patch)
2022-09-12 15:47 UTC, Martin Renvoize
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) 2022-02-04 14:58:01 UTC
What it says it does:
When editing records, (allow/don't allow) them to automatically create new authority records if needed, rather than having to reference existing authorities. 

What is actually does:
1 - Allow user to directly edit authority controlled fields in the cataloging module
2 - Link bibs to authorities when a record is added/updated
3 - Only if AutoCreateAuthorities is enabled are new authorities created, otherwise headings manually added in cataloging will remain unlinked
Comment 1 Andrew Fuerste-Henry 2022-04-22 14:57:20 UTC
We should split this functionality out into two sysprefs -- one about whether or not one can type free text into authority-controlled fields and a second about whether or not bibs link automatically on creation and import. Both of those new sysprefs should have more accurate and descriptive names than BiblioAddsAuthorities.
Comment 2 Nick Clemens (kidclamp) 2022-05-26 16:19:52 UTC
Created attachment 135389 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled
Comment 3 Nick Clemens (kidclamp) 2022-06-10 12:10:53 UTC
Created attachment 135931 [details] [review]
Bug 30025: DB update
Comment 4 Caroline Cyr La Rose 2022-06-29 19:33:56 UTC
In description of AutoLinkBiblios, there is a typo
Do/Don't attempt to **utomatically** link headings when saving records in the cataloging module, obeys LinkerRelink and CatalogModuleRelink for record edits. 

The rest seems to work.
Comment 5 Caroline Cyr La Rose 2022-06-30 20:44:11 UTC
Just marking this as Failed QA to correct the typo.
Comment 6 Nick Clemens (kidclamp) 2022-07-01 11:39:10 UTC
Created attachment 136807 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled
Comment 7 Nick Clemens (kidclamp) 2022-07-01 11:39:16 UTC
Created attachment 136808 [details] [review]
Bug 30025: DB update
Comment 8 Michal Urban 2022-07-06 17:53:33 UTC
Created attachment 137235 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled
Comment 9 Michal Urban 2022-07-06 17:53:37 UTC
Created attachment 137236 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

Followed Nick's testing procedure, works good

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 10 Marcel de Rooy 2022-07-08 07:05:59 UTC
Comment on attachment 137235 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

Same patch
Comment 11 Marcel de Rooy 2022-07-08 07:07:09 UTC
QA: Looking here
Comment 12 Marcel de Rooy 2022-07-08 07:54:59 UTC
Reading this description:
When editing records, ALLOW catalogers to manually create new headings if needed, rather than having to reference existing authorities. 

It is not completely clear to me.
When I enable this pref, I am able to change e.g. 100$a name of author while linked to a PERSO_NAME authority.
If you are using authorities, do you really want that?

But when I disable again, I can still create a new authority from the biblio form. But I am no longer able to change the 100$a.

It seems that the pref description does not really tell the story.
Comment 13 Andrew Fuerste-Henry 2022-07-08 14:17:25 UTC
> It is not completely clear to me.
> When I enable this pref, I am able to change e.g. 100$a name of author while
> linked to a PERSO_NAME authority.
> If you are using authorities, do you really want that?

In many cases, yes, this is exactly what libraries want. For a cataloger who knows their authorities well and can reliably type them into bibs by hand, it's cumbersome to use the authority picker interface. Instead, they want to just type in an author name or subject heading and let the linker take care of finding the related authority.

That said, you're right the name AllowManualAuthorityEditing gives slightly the wrong impression. This is not a question of whether or not one is manually editing authority records, but rather a question of whether or not one is manually editing authority-controlled fields in bibs.
Comment 14 Nick Clemens (kidclamp) 2022-08-16 11:13:00 UTC
Created attachment 139176 [details] [review]
Bug 30025: DB update
Comment 15 Nick Clemens (kidclamp) 2022-08-16 11:13:05 UTC
Created attachment 139177 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled
Comment 16 Nick Clemens (kidclamp) 2022-08-16 11:13:09 UTC
Created attachment 139178 [details] [review]
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority

This flips the pref from an allowance to a requirement, hopefully this makes the logic here clearer

Test as before, but the values for the renamed pref flipped
Comment 17 Caroline Cyr La Rose 2022-08-16 14:05:17 UTC
Hey Nick,

I am a bit confused with the RequireChoosingExistingAuthority pref. 

My system had AutoCreateAuthorities set to "generate" and BiblioAddsAuthorities set to "allow" before I applied the patch. I applied and updated the db.

Now, AutoCreateAuthorities is still on "generate", RequireChoosingExistingAuthority is set to "require" and AutoLinkBiblios is set to "Do". I would have expected RequireChoosingExistingAuthority to be set to "don't require" to have the same behaviour as before.

In the AutoCreateAuthorities description, it says RequireChoosingExistingAuthority must be set to "don't require". Which makes sense, but is currently not the case.

If I try to catalog something, the authority fields are not locked even though RequireChoosingExistingAuthority is set to "require". I am able to write whatever in the fields (I used 100$a) and save the record.

I changed RequireChoosingExistingAuthority to "don't require" and the fields are still not locked and I am able to write whatever and save.

I changed RequireChoosingExistingAuthority back to "require" and now the fields are locked.

Maybe someone else can confirm/infirm to make sure it's not just me... (note: I also tried it on a sandbox to make sure; changed the original prefs to generate and allow, applied patch, RequireChoosingExistingAuthority is set to require by default but am able to write whatever I want in 100$a)

Also, side note, the terminology page says we should use "authority record(s)" rather than "authority(ies)". Maybe change the RequireChoosingExistingAuthority description to "When editing records, require/don't require catalogers to reference existing authority records. If set to "don't require", catalogers can manually enter uncontrolled terms into controlled fields." I also added a period at the end of the second sentence and wrote the entire value "don't require".
Comment 18 Nick Clemens (kidclamp) 2022-08-18 15:18:59 UTC
Created attachment 139399 [details] [review]
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority

This flips the pref from an allowance to a requirement, hopefully this makes the logic here clearer

Test as before, but the values for the renamed pref flipped
Comment 19 Nick Clemens (kidclamp) 2022-08-18 15:21:25 UTC
(In reply to Caroline Cyr La Rose from comment #17)

> My system had AutoCreateAuthorities set to "generate" and
> BiblioAddsAuthorities set to "allow" before I applied the patch. 
> Now RequireChoosingExistingAuthority is set to "require" and AutoLinkBiblios is
> set to "Do". I would have expected RequireChoosingExistingAuthority to be
> set to "don't require" to have the same behaviour as before.

This should be fixed

> If I try to catalog something, the authority fields are not locked even
> though RequireChoosingExistingAuthority is set to "require". I am able to
> write whatever in the fields (I used 100$a) and save the record.

I do not recreate, try restarting all after the update to make sure the values are not cached?
Comment 20 Andrew Fuerste-Henry 2022-08-19 15:56:28 UTC
 
> > If I try to catalog something, the authority fields are not locked even
> > though RequireChoosingExistingAuthority is set to "require". I am able to
> > write whatever in the fields (I used 100$a) and save the record.
> 
> I do not recreate, try restarting all after the update to make sure the
> values are not cached?

I wasn't able to recreate this, either.
Comment 21 Andrew Fuerste-Henry 2022-08-19 15:56:52 UTC
To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can ENTER VALUES IN AUTH-CONTROLLED BIB FIELDS manually if REQUIRECHOOSINGEXISTINGAUTHORITY is set to DON'T REQUIRE
5 - Confirm you cannot ENTER VALUES IN AUTH-CONTROLLED BIB FIELDS manually if REQUIRECHOOSINGEXISTINGAUTHORITY is set to REQUIRE
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set REQUIRECHOOSINGEXISTINGAUTHORITY to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled

Updated test plan to reflect syspref names.
Comment 22 Andrew Fuerste-Henry 2022-08-19 15:58:11 UTC
Created attachment 139505 [details] [review]
Bug 30025: DB update

Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Comment 23 Andrew Fuerste-Henry 2022-08-19 15:58:15 UTC
Created attachment 139506 [details] [review]
Bug 30025: Split BiblioAddsAuthorities into two sysprefs

This patch adds two new sysprefs:
AutoLinkBiblios
AllowManualAuthorityEditing

Both inherit the setting from BiblioAddsAuhtorities which is removed

To test:
1 -Apply patches
2 - Update database
3 - Confirm old setting is transferred to new option
4 - Confirm you can edit authoriteis manually if AllowManualAuthorityEditing set to allow
5 - Confirm you cannot edit authorities manually if AllowManualAuthorityEditing set to don't allow
6 - Confirm a new bib is linked when AutoLinkBiblios is enabled (set AllowManualAuthorityEditing to add unlinked heading)
7 - Confirm new bib notlinked when AutoLinkBiblios is disabled
8 - Confim new bib not linked when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is disabled
9 - Confim new bib linked to new authority when AutoLinkBiblios is enabled, but heading doesn't match an authority and  AutoCreateAuthorities is enabled

Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Comment 24 Andrew Fuerste-Henry 2022-08-19 15:58:19 UTC
Created attachment 139507 [details] [review]
Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority

This flips the pref from an allowance to a requirement, hopefully this makes the logic here clearer

Test as before, but the values for the renamed pref flipped

Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org>
Comment 25 Martin Renvoize 2022-09-12 15:44:57 UTC
Hmm.. I'm still not 100% on the new syspref name.. but it's not a deal breaker for me.. AutoLinkBiblios.. if you take just the name it sounds like it could plausibly be about other types of biblio linking.. like 773's ;p.

However.. I think I'll leave that to the RM to debate.. QAing as is
Comment 26 Martin Renvoize 2022-09-12 15:46:08 UTC Comment hidden (obsolete)
Comment 27 Martin Renvoize 2022-09-12 15:46:12 UTC Comment hidden (obsolete)
Comment 28 Martin Renvoize 2022-09-12 15:46:17 UTC Comment hidden (obsolete)
Comment 29 Martin Renvoize 2022-09-12 15:47:27 UTC Comment hidden (obsolete)
Comment 30 Martin Renvoize 2022-09-12 15:47:31 UTC Comment hidden (obsolete)
Comment 31 Martin Renvoize 2022-09-12 15:47:36 UTC Comment hidden (obsolete)
Comment 32 Martin Renvoize 2022-09-12 15:47:59 UTC
Nice clarification in general.. Passing QA
Comment 33 Tomás Cohen Arazi 2022-09-16 20:01:06 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 34 Marcel de Rooy 2022-12-05 10:42:35 UTC
        my $biblio_adds_authorities = C4::Context->preference('BiblioAddsAuthorities');
        # Do you stuffs here
        $dbh->do(q{
            INSERT IGNORE INTO systempreferences
            ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
            ('RequireChoosingExistingAuthority',?,NULL,'Require selecting existing authority entry in controlled fields during cataloging.','YesNo'),
            ('AutoLinkBiblios',?,NULL,'If enabled, link biblio to authorities on creation and edit','YesNo')
        },undef,($biblio_adds_authorities eq '1' ? '0' : '1', $biblio_adds_authorities));

Use of uninitialized value $biblio_adds_authorities in string eq at /usr/share/koha/installer/data/mysql/db_revs/220600047.pl line 11.
Comment 35 Jonathan Druart 2024-02-29 14:01:39 UTC
You typoed the syspref's name!

"AutoCreateAuthorites"
Comment 36 Jonathan Druart 2024-02-29 14:04:47 UTC
Why do we see the warning with the default data?

System preference 'RequireChoosingExistingAuthority' is disabled, but needs 'AutoCreateAuthorites' enabled. Otherwise catalogers can add headings that will not be linked to authorities.
Comment 37 Nick Clemens (kidclamp) 2024-02-29 14:57:36 UTC
(In reply to Jonathan Druart from comment #36)
> Why do we see the warning with the default data?
> 
> System preference 'RequireChoosingExistingAuthority' is disabled, but needs
> 'AutoCreateAuthorites' enabled. Otherwise catalogers can add headings that
> will not be linked to authorities.

This is how it was before these patches as well.

Some libraries do operate in this mode - they don't want authorities created automatically.

Warning introduced by bug 8301