From 8ad89640b8846299673af2f944d4729298c060f4 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Tue, 1 May 2018 20:41:39 +0000 Subject: [PATCH] Bug 20678 - Added cataloging subpermission for cataloging A major benefit of this save draft MARC records feature is that it allows libraries to train junior staff on cataloging MARC records and then set those records to drafts so they are not displayed in opac search results and can be all administered together in the Cataloging module. This patch adds the new cataloging sub-permission of 'commit_MARC_records_to_catalog'. Junior staff accounts can be given all editcatalogue permissions EXCEPT 'commit_drafts_to_catalog' and this means they can create MARC records by only the 'Save without cataloging' option is displayed for saving the record. For superlibrarians and senior librarians all editcatalog subpermissions can be enabled and they can either add/edit/delete draft and catalog MARC records. i.e. Everyone can create a draft record, but patrons can only add/edit/delete catalog records if they have the 'commit_MARC_records_to_catalog' subpermission in addition to the other neccessary editcatalogue permission for example 'edit_catalogue' Test plan: 1. Create two user accounts one with superlibrarian permissions and the other with all editcatalogue subpermissions except for 'commit_MARC_records_to_catalog' and also enable the catalogue permission so they can access the staff client. 2. Log in as superlibrarian go to Cataloging create a New record and select the 'Save' dropdown box and notice you have 4 options. Select 'Save and view record' and notice you have created a biblio in the catalog. 3. Log out and log in as the the other user which has restricted catalog permissions. Again go to Cataloging and create a new record and click the 'Save' button and notice that there is only one option 'Save without cataloging'. Meaning you are restricted to only creating a draft record. 4. Select 'Save without cataloging' and you are re-directed to the Cataloging main page. Now select the 'View draft records' button and view your draft record in the table of draft records. Sponsored-By: Toi Ohomai Institute of Technology --- installer/data/mysql/atomicupdate/add_draft_record_batch.sql | 1 - .../data/mysql/atomicupdate/bug_20678_save_draft_records.sql | 3 +++ koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 1 + .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 10 ++++++---- 4 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/add_draft_record_batch.sql create mode 100644 installer/data/mysql/atomicupdate/bug_20678_save_draft_records.sql diff --git a/installer/data/mysql/atomicupdate/add_draft_record_batch.sql b/installer/data/mysql/atomicupdate/add_draft_record_batch.sql deleted file mode 100644 index b69e9aa..0000000 --- a/installer/data/mysql/atomicupdate/add_draft_record_batch.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO import_batches (import_batch_id,record_type,file_name,comments) VALUES (1, 'biblio', 'Draft record', 'Draft MARC records created in the addbiblio.pl file but not saved to the Koha catalog'); diff --git a/installer/data/mysql/atomicupdate/bug_20678_save_draft_records.sql b/installer/data/mysql/atomicupdate/bug_20678_save_draft_records.sql new file mode 100644 index 0000000..ffe8ed5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20678_save_draft_records.sql @@ -0,0 +1,3 @@ +INSERT INTO import_batches (import_batch_id,record_type,file_name,comments) VALUES (1, 'biblio', 'Draft record', 'Draft MARC records created in the addbiblio.pl file but not saved to the Koha catalog'); +INSERT INTO permissions (module_bit, code, description) VALUES (9, 'commit_MARC_records_to_catalog', 'Commit MARC records to the catalog. If not enabled then a patron will only be able to create draft records if other editcatalogue subpermissions are enabled'); +INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('EnableDraftRecords', 1, NULL, 'IF enabled staff and catalogers will be able to save records to the reservoir as a draft rather than to the catalog. Also the link to the draft records interface in the Cataloguing module will be visible', ''YesNo'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 78f4995..256d8fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -43,6 +43,7 @@ [%- CASE 'edit_items' -%]Edit items [%- CASE 'edit_items_restricted' -%]Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required) [%- CASE 'fast_cataloging' -%]Fast cataloging + [%- CASE 'commit_MARC_records_to_catalog' -%]Commit MARC records to the catalog. If not enabled then a patron will only be able to create draft records if other editcatalogue subpermissions are enabled [%- CASE 'remaining_permissions' -%]Remaining permissions for managing fines and fees [%- CASE 'writeoff' -%]Write off fines and fees [%- CASE 'budget_add_del' -%]Add and delete budgets (but can't modify budgets) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 41864ae..fd3f644 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -467,14 +467,16 @@ function Changefwk() { [% ELSE %]
- +
-- 2.1.4