Summary: | Split BiblioAddsAuthorities into 2 preferences | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | MARC Authority data support | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, caroline.cyr-la-rose, dcook, jonathan.druart, katrin.fischer, m.de.rooy, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9015 | ||
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
Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority Bug 30025: DB update Bug 30025: Split BiblioAddsAuthorities into two sysprefs Bug 30025: Replace AllowManualAuthorityEditing with RequireChoosingExistingAuthority |
Description
Nick Clemens (kidclamp)
2022-02-04 14:58:01 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. 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 Created attachment 135931 [details] [review] Bug 30025: DB update 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. Just marking this as Failed QA to correct the typo. 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 Created attachment 136808 [details] [review] Bug 30025: DB update 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 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 on attachment 137235 [details] [review] Bug 30025: Split BiblioAddsAuthorities into two sysprefs Same patch QA: Looking here 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. > 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.
Created attachment 139176 [details] [review] Bug 30025: DB update 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 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 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". 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 (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?
> > 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.
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. Created attachment 139505 [details] [review] Bug 30025: DB update Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org> 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> 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> 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 Created attachment 140466 [details] [review] Bug 30025: DB update Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org> Created attachment 140467 [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> Created attachment 140468 [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> Created attachment 140469 [details] [review] Bug 30025: DB update Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 140470 [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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 140471 [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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice clarification in general.. Passing QA Pushed to master for 22.11. Nice work everyone, thanks! 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. You typoed the syspref's name! "AutoCreateAuthorites" 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. (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 |