One of our clients has requested the functionality to be able to save a MARC record as a draft so they can return to continue cataloguing it later. This will be achieved by saving the record to the 'reservoir' in much the same way that staged records are stored in the 'import_*' tables but not in the biblio table. The functionality has been achieved in the first patch I will attach, and unit tests for this will come later.
Created attachment 74922 [details] [review] Bug 20678 - Save draft MARC record without committing to catalog In the 'Save' dropdown button in addbiblio.pl patrons can select the 'Save without cataloguing' button. This saves the catalog to the import_biblio db table (also referred to as the reservoir) but not to the catalog. To re-edit or save this draft record the user can either go to Tools->Manage staged MARC records and select the 'Draft records' tab, which displays all these draft records along with links to edit them in the cataloguing interface. Or the patron can search for the record in the addbooks.pl webpage in the cataloguing interface and the record will be displayed in the 'Biblios in the reservoir' section of results. Then the user can select Actions->Continue editing draft record By being able to save a record as a draft it means a librarian does not have to either save a un-finished MARC record to the catalog, or start again cataloguing from scratch if they are interrupted during cataloguing. Test plan: 1. Drop and re-create your DB and go through the web installation process so that the new atomicupdate is run 2. Go to Tools->Manage staged MARC records and notice there is a default batch file 'draft_marc_records.mrc' (with the id of 1) this batch file is what all the draft records will be 'stored' in when they are stored in the import_biblios db table. A batch file is required for all records in this aforementioned table due to foreign key constraints. 3. Go to Cataloging->New record and create a MARC record and select Save->Save without cataloging 4. Search for the title you just created and notice it is displayed in the 'Biblios in reservoir' result section and not in the catalog results. 5. Select Actions->Continue editing draft record' and now select 'Save and view record' 6. Now search the catalog for the title and the detail page of the cataloged record appears showing the record is now committed to the catalog. 7. Go to Tools->Manage staged MARC records and click on the 'Draft records' tab and notice the title you saved as a draft is displayed in the table along with a 'Edit' link which is for the cataloging page. The benefit of having this table of all draft records is librarians can quickly find all draft records and click to edit and commit the draft records to the catalog without having to remember the title of the draft record was in the cataloging search Sponsored-by: Toi Ohomai library
Unit test patch to come
Created attachment 74928 [details] [review] Bug 20678 : Added removal of biblio from reservoir after saving to catalog Added new subroutine DeleteBiblioInBatch() and internal subroutine _delete_import_record_marc() (which is called by the DeleteBiblioInBatch() subroutine) in the C4/ImportBatches.pm file. If addbiblio.pl webpage has breedingid defined in the URL this means the biblio being edited currently exists as a draft in the reservoir. And so when a save option except for 'Save without catalog' is clicked this means the biblio is committed to the catalog and DeleteBiblioInBatch() is called to remove the biblio from the reservoir. Test plan: 1. Go to Cataloging->New record 2. After inputting the record data select 'Save without cataloging' 3. Perform a catalog search with the title of the biblio you just created 4. Notice the draft biblio you created is returned in the 'Biblios in reservoir' search results 5. Select Actions->Continue editing draft record 6. Perform the following database queries: 6a. SELECT * FROM biblio WHERE title='<title of draft biblio'; - This will return no records as the record is still a draft and has not been committed to catalog 6b. SELECT * FROM import_biblios WHERE title='<title of draft biblio>'; - This will return the biblio record as it has been saved to reservoir. Note down the import_record_id to use in 6c. 6c. SELECT * FROM import_records WHERE import_record_id = <id number>; - This will return a record as the biblio has been saved to the reservoir 7. Open a new tab and go to Tools->Manage staged MARC records and select the 'Draft records' tab and notice the draft biblio you just created is displayed in the table of draft records in the reservoir 8. Back in your first tab select the 'Save and view record' 9. Now perform the database queries 6a, 6b and 6c and notice the biblio record is returned for 6a as the MARC record has been committed to the catalog, and no records are returned for 6b and 6c because the biblio has been removed from the reservoir 10. In the second tab refresh the page and notice the biblio that you just committed to the catalog is not displayed in the draft records tab Sponsored-By: Toi Ohomai Institute of Technology
Created attachment 74929 [details] [review] Bug 20678 - Added unit test for new subroutine DeleteBiblioInBatch() This new subroutine is in C4/ImportBatches.pm and it calls a new internal subroutine _delete_import_record_marc Test plan: 1.Enter koha shell: sudo koha-shell <instancename> 2. perl t/db_dependent/ImportBatch.pm 3. Notice unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' Sponsored-By: Toi Ohomai Institute of Technology
Isn't it possible to achieve the same result with the OpacSuppression syspref?
More patches will be applied to this bug report shortly to introduce a standalone interface in Cataloging interface to administer draft records. Thanks for your comment Frédéric, the OPACSuppression syspref provides similar functionality in terms of hiding some biblio records from search results. However the big benefit of this draft record functionality is that all draft records are listed on a single interface together. This will save librarians of large libraries having to remember all the titles of half finished biblios they were halfway through cataloging, so they can find them in the staff client, to continue editing the biblios. i.e. it is giving more options to librarians.
Created attachment 74960 [details] [review] Bug 20678 - Added new Draft records interface in cataloging Instead of using the Tools->Manage Staged MARC records interface to list all draft records and links to edit or delete them I have created a new interface in the Cataloging module (draftrecords.pl) which is accessible by clicking the 'View draft records' button at the top of the Cataloging home page. draftrecords.pl contains a JS datatable of all draft records in the reservoir. There is a link to delete all draft records, in addition to individual 'Edit' and 'Delete' buttons for each draft record. This datatable is based on the datatable on the Manage Staged MARC records interface and I have removed unneccessary columns such as comments, type, staged timestamp etc. The rationale for creating a new Draft records interface in cataloging rather than using the existing Manage Staged MARC records interface is that it is more intuitive for librarians to look in cataloging for draft records to continue cataloging. They would be very unlikely to think draft records can be accessed from the Manage Staged MARC records. i.e. Although the draft records use the same backend infrastructure as the staged records the end-users don't know or care about that. Thus it is best to place the Draft records interface in the Cataloging module as the draft records are part way through the cataloging workflow. Also added to the Cataloging home page I have implemented a 'Drafts only' search parameter checkbox hidden by default, so if librarians know the title of the draft record they want they can find it quickly without wading through catalog records also matching the search term. Test plan: 1. Go to Tools->Manage Staged MARC records, notice the first batch file is not shown. This is the batch file associated with the draft records. This is hidden because this file is only needed due to foreign key constraints in the database but it is not needed to be imported and so it is safest to hide it. 2. Go to Cataloging and notice there is a new button in the cataloging toolbar named 'View draft records' 3. Create a new record and after inputting record data select Save->Save without cataloging. You have created a draft record. 4. Your re-directed to the Cataloging home page. Search for the draft record by writing in the search term and selecting 'Submit' and notice it is returned in the 'Biblios in the reservoir' search results. There may also be similarly named catalog records displayed in the result table above. 5. Now to limit the cataloging search to draft records select the [+] link next to the search box and select the 'Drafts only' checkbox. 6. Now notice that only draft records in the reservoir are returned. 7. Go and create another 3 draft records and then after you are re-directed to the Cataloging homepage click on the 'View draft records' button in the cataloging toolbar. 8. The 'View draft records' webpage is displayed. Notice all 4 draft records are displayed in the datatable. 9. Select the 'Edit' link of one of the draft records and notice the addbiblio.pl page for that record is displayed. 10. Commit the draft record to the catalog by selecting any option of the 'Save' dropdown box except for the 'Save without cataloging' option. 11. Then return to the 'View draft records' page and notice the committed record is not displayed as a draft in the reservoir. This can be confirmed by performing a Cataloging search which shows the record is in the catalog and has been removed from the reservoir. 12. Back in the 'View draft records' select the 'Delete' link beside one of the draft records, notice it is successfully deleted. 13. Select the 'Delete all drafts from reservoir' and notice all the drafts are removed successfully. NOTE: this patch has not added/amended routines in modules and so this patch does not require further unit tests to be added. I have previously added a unit test to address module routine changes made in previous patches on this bug. Sponsored-By: Toi Ohomai Institute of Technology
Created attachment 74961 [details] [review] Bug 20678 - Fixed update of number of records in draft batch file Also added icons onto the 'View draft records' in addbooks.tt and draftrecords.tt Test plan: 1. Go to Cataloging->View draft records and notice the count of the number of returned draft records in the top left hand corner of the datatable containing draft records is accurate. 2. Also notice that on the addbooks.pl and draftrecords.pl the 'View draft records' button has a eye icon on it Sponsored-By: Toi Ohomai Institute of Technology
Created attachment 74962 [details] [review] 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
Created attachment 75192 [details] [review] Bug 20699 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Created attachment 75193 [details] [review] Bug 20699 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Created attachment 78021 [details] [review] Bug 20699 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Just attached the save marc draft commit rebased against 18.05.02 so it now applies cleanly, ready for testing :)
It would be better to make the button say "Save as Draft" rather than save without cataloguing. We have been using the OpacSuppression syspref and a report that shows suppressed records, when training new staff, but this sounds more elegant.
Hi Elaine, The reason that we went with "save without cataloguing" is that the word Draft is both a noun and a verb. Save without cataloguing is easier to translate. Cheers, Liz
In a sentence it should work I think "save as draft" makes it clear that draft is a not a verb here. The problem is when draft appears without any context - then it's hard to tell what is really meant. Save without cataloguing somehow doesn't sound right to me, because even creating a draft means you are cataloguing. Maybe what's meant is: Save without adding to catalog (which is too long, I admit it).
+1 'save as draft' To a cataloguer, 'save without cataloguing' makes no sense. It makes one wonder what's going to happen to the data when the button is pushed.
*** Bug 20699 has been marked as a duplicate of this bug. ***
Created attachment 78920 [details] [review] Bug 20678 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Rebased against master on 16th of sept 2018. We (Catalyst) believe the best way to get this feature upstreamed is for those who would like the wording to be changed to 'Save as draft' to make a dependent bug report with a patch implementing that wording change. i.e. we should try and get this useful new feature as it is into master and then those who have differing views on the wording can make a dependent patch which implements the wording they would like.
(In reply to Alex Buckley from comment #20) > Rebased against master on 16th of sept 2018. > > We (Catalyst) believe the best way to get this feature upstreamed is for > those who would like the wording to be changed to 'Save as draft' to make a > dependent bug report with a patch implementing that wording change. I'm fine with this. However, I see a couple of bugs: On the "View drafts" view, the DataTables controls don't seem to be working. They display incorrectly and don't appear to do anything. As Alex and I discussed, there is an issue with the way the current patch implements insertion of a "drafts" staged record. A follow-up should improve it. I think the "Delete all drafts" should have a confirmation alert.
(In reply to Alex Buckley from comment #20) > Rebased against master on 16th of sept 2018. > > We (Catalyst) believe the best way to get this feature upstreamed is for > those who would like the wording to be changed to 'Save as draft' to make a > dependent bug report with a patch implementing that wording change. > > i.e. we should try and get this useful new feature as it is into master and > then those who have differing views on the wording can make a dependent > patch which implements the wording they would like. I'd like to add something here. Changing the wording later might create a lot of work for a lot of people: - developers - testers - documentation writers - translators Why not change the little detail now? If I see it correctly, it would be only one line to change: + <li><a id="previewrecord" name="previewrecord" href="#">Save without cataloging</a></li>
Any progress on Bug 20678? Carnegie Team
(In reply to Katrin Fischer from comment #22) > Why not change the little detail now? If I see it correctly, it would be > only one line to change: > +1
(In reply to Katrin in comment #22): Hi Katrin, Fair enough I will make that wording change to 'Save as Draft'. I am revisiting this now and over the Christmas period when I will hopefully have some time. Sorry for the delay on this one, it is definitely a priority for me to work on to try to get into 19.05 Cheers, Alex
Hi Alex, thx! Just to be sure: Save as _d_raft! :)
Created attachment 92248 [details] [review] Bug 20678 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Hi all, I am going to continue to work on this enhancement, as we have had a lot of libraries say the ability to save a draft record would be very useful to them. I have changed the wording to 'Save as draft' and have rebased the patch against master. I have noticed a few bugs which I want to fix up next. Thanks Alex
Hey Alex, when you continue work on this, just a reminder to add changes to installer/data/mysql/sysprefs.sql and installer/data/mysql/userpermissions.sql !
Created attachment 107454 [details] [review] Bug 20699 - Implemented a save marc as draft feature This patch implements the ability to save marc records to the reservior (in a similar way to how imported staged records are stored in the reservior). The purpose of this feature is to be able to train junior library staff and catalogers by letting them practise cataloging biblio records and saving them as drafts (stored in the reservoir). Because these draft records are stored in the reservoir they are not returned as OPAC search results. This patch implements a new 'editcatalogue' subpermission called 'commit_MARC_records_to_catalog'. A staff member must have this subpermission enabled to commit a record to the catalog. In the addbiblio.pl interface users with all editcatalogue subpermissions (which should be staff experienced with cataloging) will see 4 'Save' options: * Save and review record * Save and edit items * Save and continue editing * Save without cataloging Junior staff should have all editcatalog subpermissions except for 'commit_MARC_records_to_catalog' and they will see one save option 'Save without cataloging' and this saves the record as a draft. To view and administer all draft records you can click on the 'View draft records' button in the toolbar on the addbooks.pl page. Here draft records are listed newest to oldest and individual draft records can be edited/deleted or all draft records can be deleted in one go. Test plan: Test plan: 1. Go to addbooks.pl and notice there is no 'View draft reocrds' button in the toolbar alongside 'New record' 2. Apply patch 3. Restart plack, memcached 4. Update your database, this can be achieved by runnning installer/data/mysql/updatedatabase.pl or in Koha staff client going to Adminstration->Global system preferences->Local use and amending the Version syspref value 5. 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 this user can access the staff client. 6. 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. 7. Log out and log in as user 2 go to Cataloging->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. 8. 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. 9. Select the 'Edit' link and notice the addbiblio.pl page for the draft record is loaded 10. 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. 11. 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 12. Create 1 more draft record and then log out 13. Log in as user 1 (superlibrarian) and go to the View draft records interface. 14. Select the 'Edit' link 15. Select any save option except for 'Save without cataloguing' and notice the record is now committed to the catalog. 16. 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. 17. Run the unit test t/db_dependent/ImportBatch.t in koha-shell 18. Notice that unit test 12 passes: 'ok 12 - No biblio expected since we deleted the biblio from the batch' 19. 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
Created attachment 107472 [details] [review] 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
I don't have capacity to work on this, but if someone else wants to work on this they can.
I just found this and it looks wonderful--it's not just useful for junior catalogers, but useful for cataloging something that could take a REALLY long time (i.e., there are items that require research, there are times when one is doing original cataloging and gets interrupted, etc.) Is it ready to test for signing-off?? --h2