[Koha-bugs] [Bug 20678] Save draft records without committing them to the catalogue

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 29 02:40:20 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20678

--- Comment #31 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 107472
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107472&action=edit
Bug 20678: Save biblio records as a draft record

Allow junior/in-training library staff to save a incomplete bibliographic
record as a draft. It will not be returned for OPAC searches or most
staff client searches (it will be returned for Cataloguing module searches when
the 'Drafts only'
checkbox is selected).

This patch implements:

* New 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'.
Without this subpermission ticked a staff member will only be able to save
draft records).

* A new 'Save' option in the addbiblio.pl page: 'Save as draft'.

* View/edit/delete draft records in new cataloguing module page:
draftrecords.pl

Junior staff should have all editcatalog subpermissions except for
'commit_MARC_records_to_catalog' and they will see one save option 'Save
as draft' in the addbiblio.pl page.

Test plan:
1. Go to addbooks.pl and notice there is no 'View draft records' button
in the toolbar alongside 'New record'

2. Apply patch

3. Restart memcached, plack, update database

4. Create two user accounts:

* A superlibrarian permissions
* Patron with all editcatalogue subpermissions except for
'commit_MARC_records_to_catalog'. Also enable this patron to view the
staff client

5. Log in as user 1 (superlibrarian) go to Cataloging->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.

6. Log in as user 2 go to Cataloging->New record and
click the 'Save' button and notice that there is only one option 'Save
as draft'.

7. Select 'Save as draft' 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.

8. Select the 'Edit' link and notice the addbiblio.pl page for the draft
record is loaded

9. Return to the View draft records interface and delete the draft
record and notice that after the page reloads the record is no longer
displayed in the table.

10. Create 2 more draft records and return to the View draft records
interface and select 'Delete all drafts from reservoir' and notice the
drafts table is emptied

11. Create 1 more draft record and then log out

12. Log in as user 1 (superlibrarian) and go to the 'View draft records'
interface.

13. Select the 'Edit' link

14. Select any save option except for 'Save as draft' and
notice the record is now returned for OPAC and staff client searches

15. Return to the 'View draft records' interface and notice the record
you just committed to the catalog has been removed as a draft record in
the reservoir.

16. Run the unit test t/db_dependent/ImportBatch.t in koha-shell

17. Notice that unit test 12 passes: 'ok 12 - No biblio expected since
we deleted the biblio from the batch'

18. Log out and back in as the second user and search for a biblio
record which is in the catalog (i.e. not a draft record) and notice both
in the staff client search results and the biblio detail page the links
to edit the record and items associated with the biblio record are not
displayed. This is because the user you are logged in as has all
edit_catalogue permissions except
CAN_user_editcatalogue_commit_MARC_records_to_catalog which is
neccessary to add/edit/delete biblios or items in the catalog.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list