https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42625
--- Comment #220 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 211243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211243&action=edit Bug 42625: Add record source library group exemption schema Records from a record source that is not editable are locked: only staff with the edit_locked_records permission can change them. This series lets the staff of chosen libraries edit those records anyway, by naming the library groups that are exempt from a record source's lock. Add the database structure for it: - library_groups.ft_record_source_editing is a new feature flag, next to the other "Use for ..." settings, that marks the groups which can be used for this purpose - record_sources_library_groups links a record source to the library groups exempt from its lock. The links are removed when the record source or the library group is deleted The test plan below covers the whole series. To test: 1. Apply all patches, run updatedatabase.pl, yarn build and yarn api:bundle, then restart Plack 2. Administration > Library groups > New group. Enter a title, check "Use for record source editing", save, then add library A to the group with "Add library" 3. Administration > Record sources > New record source. Enter a name, leave "Can be edited" unchecked, select the group under "Editable by library groups" and save. Edit it again: the group is selected 4. Assign the source to a bibliographic record, e.g. in koha-mysql: UPDATE biblio_metadata SET record_source_id = <id> WHERE biblionumber = <biblionumber> The record's detail page shows "Record source: <name>" with a lock icon 5. Log in as a cataloguer from library B with edit_catalogue but not edit_locked_records. On the record, Edit > Edit record is disabled with "This record is locked" 6. Log in as a cataloguer from library A with the same permissions. Edit > Edit record opens the editor 7. As superlibrarian, edit the library group, uncheck "Use for record source editing" and click Update. Cancel the confirmation: the modal stays open. Click Update again and confirm. Edit the record source: no group is selected. Repeat step 6: Edit > Edit record is now disabled for the library A cataloguer 8. Run: prove t/db_dependent/Koha/RecordSource.t t/db_dependent/Koha/Patron.t t/db_dependent/Koha/Biblio.t t/db_dependent/LibraryGroups.t t/db_dependent/api/v1/library_groups.t t/db_dependent/api/v1/record_sources.t 9. Run: yarn cypress run --spec t/cypress/integration/Admin/RecordSources_spec.ts Signed-off-by: Brendan Lawlor <[email protected]> Sponsored-by: CLAMS Signed-off-by: Andrew Fuerste Henry <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
