https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44010
--- Comment #11 from Andrew Fuerste-Henry <[email protected]> --- Created attachment 210699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210699&action=edit Bug 44010: Skip locked records in batch record modification Test plan: 1. Apply all patches and restart Plack 2. Administration > Record sources > New record source. Enter a name, leave "Can be edited" unchecked and save. Assign it to a bibliographic record, e.g. in koha-mysql: UPDATE biblio_metadata SET record_source_id = <id> WHERE biblionumber = <biblionumber> 3. Cataloging > MARC modification templates. Create template A with one action that adds a 500$a. Create template B with actions that add 952$a and 952$b (a branchcode) and 952$y (an item type) 4. Log in as a cataloguer with edit_catalogue, edit_items, records_batchmod, stage_marc_import and manage_staged_marc but not edit_locked_records 5. On the record, Edit > "Edit record", "Modify record using template", "Replace record via Z39.50/SRU" and "Delete record" are disabled with the tooltip "This record is locked". New > "New item" still opens the item editor 6. Cataloging > Batch record modification > "Enter a list of record numbers". Enter the biblionumber, pick template A, continue and modify. The job reports "has not been modified. Its record source is locked and you do not have permission to edit it". The record has no new 500 7. Repeat step 6 with template B. The job reports "Items were added to bibliographic record ..., but the record itself has not been modified". The record has one new item 8. Export the record as MARC. Change the 245$a and add a 952 with $a, $b, $y and an unused barcode in $p. Cataloging > Stage records for import. Upload the file, pick a matching rule that matches the record (e.g. on 999$c), stage, then import the batch with "Replace existing record" for matches 9. The import report shows "Number of records not overlaid because their record source is locked: 1". The record keeps its title and has the new item 10. Log in as a user with edit_locked_records and repeat steps 5 to 7. "Edit record", "Modify record using template" and "Replace record via Z39.50/SRU" are enabled ("Delete record" stays disabled while the record has items) and the batch job modifies the record 11. Run: prove t/db_dependent/ImportBatch.t t/db_dependent/Koha/BackgroundJob/BatchUpdateBiblio.t 12. Run: yarn cypress run --spec t/cypress/integration/LockedRecordToolbar_spec.ts Signed-off-by: Brendan Lawlor <[email protected]> Sponsored-by: CLAMS Signed-off-by: Andrew Fuerste Henry <[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/
