Bug 18129

Summary: Adding staging user to staged batches, for better filtering
Product: Koha Reporter: Stefan Berndtsson <stefan.berndtsson>
Component: CatalogingAssignee: Galen Charlton <gmcharlt>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Adding staging user to staged batches, for better filtering
Adding staging user to staged batches, for better filtering
Adding staging user to staged batches, for better filtering

Description Stefan Berndtsson 2017-02-16 09:47:43 UTC
When multiple users use "Stage MARC for import" as a daily cataloging tool, it would be helpful if the uploading user could be stored with the staged batch.

This would make it possible (perhaps via a SysPref) to filter the staged list to that particular user. We have tools that create the upload files based on today's date, so distinguishing this based on file name is not really doable. Having to add a comment each time also isn't too practical, and you can't filter on either of those anyway.

Also, showing imported batches in the list can be a bit overwhelming after a while, and deletion of them are multiple steps, which makes the cataloging flow longer.

What I propose is the following enhancement:

1. Add currently logged in username as a field in the import_batches table.
2. When uploading, write that username in that field.
3. Have a SysPref that can be set to filter the staged list (both the tool and the acquisition selector from staged) by that same username.
4. Have a SysPref that can be set to filter so that "Imported" and "Cleaned" are hidden.
5. For the batch list, have the option of "Show all batches" when the filters in 3 and 4 are active.
Comment 1 Stefan Berndtsson 2017-02-21 13:33:41 UTC
Created attachment 60496 [details] [review]
Adding staging user to staged batches, for better filtering
Comment 2 Stefan Berndtsson 2017-02-21 13:39:50 UTC
Usage instructions for the provided patch.

In System preferences, under Cataloging / Importing there are now two more options.

StageFilterByUser which enables filtering the list of staged batches to only show those uploaded by me (filtered on uploading borrowernumber).

StageHideCleanedImported further filters the list to hide all cleaned and imported batches.

The tool Staged MARC management now has a column "User" which lists the "userid" of the borrower. There is also a link to temporarily disable the filters and show the full unfiltered list (also available as a link in the infobox when no batches are shown).
Comment 3 Stefan Berndtsson 2017-02-22 10:56:30 UTC
Created attachment 60543 [details] [review]
Adding staging user to staged batches, for better filtering

Add borrowernumber to staged imports, and set it to the currently logged in user.
SysPref to turn on filtering of staged import list so that only batches staged by logged in user is visible.
SysPref to remove Cleaned/Imported batches from staged import list.
Link near list to ignore filter, in case one needs to see all batches.
Comment 4 Stefan Berndtsson 2017-02-22 10:57:35 UTC
New patch fixes small conflict with master.
Comment 5 Stefan Berndtsson 2017-02-23 14:53:45 UTC
Created attachment 60609 [details] [review]
Adding staging user to staged batches, for better filtering

Minor error in template due to pasting wrong thing.
Comment 6 Katrin Fischer 2020-01-11 23:47:02 UTC
Should this have been Needs Signoff?