Bugzilla – Attachment 74962 Details for
Bug 20678
Save draft records without committing them to the catalogue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20678 - Added cataloging subpermission for cataloging
Bug-20678---Added-cataloging-subpermission-for-cat.patch (text/plain), 7.01 KB, created by
Alex Buckley
on 2018-05-02 01:32:11 UTC
(
hide
)
Description:
Bug 20678 - Added cataloging subpermission for cataloging
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-05-02 01:32:11 UTC
Size:
7.01 KB
patch
obsolete
>From 8ad89640b8846299673af2f944d4729298c060f4 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >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' -%]<span>Edit items</span> > [%- CASE 'edit_items_restricted' -%]<span>Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)</span> > [%- CASE 'fast_cataloging' -%]<span>Fast cataloging</span> >+ [%- CASE 'commit_MARC_records_to_catalog' -%]<span>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</span> > [%- CASE 'remaining_permissions' -%]<span>Remaining permissions for managing fines and fees</span> > [%- CASE 'writeoff' -%]<span>Write off fines and fees</span> > [%- CASE 'budget_add_del' -%]<span>Add and delete budgets (but can't modify budgets)</span> >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 %] > <!-- Not using fast cataloging - Display split menu --> > <div class="btn-group"> >- <button class="btn btn-default btn-sm" id="saverecord"><i class="fa fa-save"></i> Save</button> >+ <button class="btn btn-default btn-sm" id="saverecord"><i class="fa fa-save"></i> Save </button> > <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> > <span class="caret"></span> > </button> > <ul class="dropdown-menu"> >- <li><a id="saveandview" href="#">Save and view record</a></li> >- <li><a id="saveanditems" href="#">Save and edit items</a></li> >- <li><a id="saveandcontinue" href="#">Save and continue editing</a></li> >+ [% IF CAN_user_editcatalogue_commit_MARC_records_to_catalog %] >+ <li><a id="saveandview" href="#">Save and view record</a></li> >+ <li><a id="saveanditems" href="#">Save and edit items</a></li> >+ <li><a id="saveandcontinue" href="#">Save and continue editing</a></li> >+ [% END %] > <li><a id="previewrecord" name="previewrecord" href="#">Save without cataloging</a></li> > </ul> > </div> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20678
:
74922
|
74928
|
74929
|
74960
|
74961
|
74962
|
75192
|
75193
|
78021
|
78920
|
92248
|
107454
|
107472