Bug 28843 - Add view and edit buttons to result of MARC record import
Summary: Add view and edit buttons to result of MARC record import
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-11 12:26 UTC by Owen Leonard
Modified: 2021-09-03 14:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 28843: Add view and edit buttons to result of MARC record import (3.13 KB, patch)
2021-08-11 12:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28843: Add view and edit buttons to result of MARC record import (3.19 KB, patch)
2021-08-11 22:00 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 28843: Add view and edit buttons to result of MARC record import (3.30 KB, patch)
2021-08-18 11:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28843: Add view and edit buttons to result of MARC record import (3.37 KB, patch)
2021-08-20 06:35 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28843: Add view and edit buttons to result of MARC record import (3.43 KB, patch)
2021-08-29 11:06 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-08-11 12:26:59 UTC
After importing a staged file of MARC records, the results of the import are shown in a table. The last column contains the biblionumber linked to the detail view of that record.

I'd like to replace that biblionumber link with two buttons: View and Edit.
Comment 1 Owen Leonard 2021-08-11 12:44:54 UTC Comment hidden (obsolete)
Comment 2 sandboxes@biblibre.com 2021-08-11 22:00:05 UTC
Created attachment 123804 [details] [review]
Bug 28843: Add view and edit buttons to result of MARC record import

This patch adds "View" and "Edit" buttons to the output of the result of
a MARC record import.

To test, apply the patch and go to Tools -> State MARC for import.

 - Import a file of MARC records.
 - Click the "Manage staged records" button.
 - In the table of staged records the last column labeled "Records"
   should be empty.
 - Click "Import this batch into the catalog."
 - The table of records will be shown again, and this time the last
   column should contain "View" and "Edit" buttons for each row.
 - Confirm that the buttons work correctly, opening the correct record
   for viewing and editing.

Test with both bibliographic and authority records to confirm that the
correct view and edit pages open for each.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Barbara Johnson 2021-08-13 15:59:22 UTC
I originally signed off on this bug, but had some concerns so I revisited it and changed the status to In Discussion.

1. A staff member who does not have edit permissions still sees the edit button.  Clicking on the edit button takes them to a Koha login screen.  It would be better if the staff member did not see the edit button at all if they can't edit anything.

2. When a staff member that does not have bib editing permissions clicks on the View button from manage-marc-import.pl they are taken to a view only display on detail.pl which seems correct.  However, clicking on the Edit dropdown on this screen gives them the ability to edit the record using a MARC mod template even though they do not have the permission for editing these templates.  A staff member with view only permissions should not be able to edit the bib record at all. 

3. In discussing this issue with an expert cataloger she had the following to say:
"I can't think of a single reason why I'd allow someone to load files without any editing permissions, frankly--looking at a loaded file is a quality control step, and if someone doesn't have the expertise to edit MARC (bib or aut), how are they going to have the expertise to, e.g., troubleshoot something that should have overlaid but didn't?"  Based on this comment it seems she would question whether a view option is even needed.
Comment 4 Owen Leonard 2021-08-13 16:31:38 UTC
(In reply to Barbara Johnson from comment #3)
> 
> 2. ...However, clicking on the Edit
> dropdown on this screen gives them the ability to edit the record using a
> MARC mod template even though they do not have the permission for editing
> these templates.

This sounds like it needs a new bug report.

> 3. ... Based on this
> comment it seems she would question whether a view option is even needed.

The view option was always there, it was just unclear what it was because the link was just a number.

Marking "Failed QA" in order to address issue 1.
Comment 5 Owen Leonard 2021-08-18 11:24:36 UTC
Created attachment 123938 [details] [review]
Bug 28843: Add view and edit buttons to result of MARC record import

This patch adds "View" and "Edit" buttons to the output of the result of
a MARC record import.

To test, apply the patch and go to Tools -> State MARC for import.

 - Import a file of MARC records.
 - Click the "Manage staged records" button.
 - In the table of staged records the last column labeled "Records"
   should be empty.
 - Click "Import this batch into the catalog."
 - The table of records will be shown again, and this time the last
   column should contain "View" and "Edit" buttons for each row.
 - Confirm that the buttons work correctly, opening the correct record
   for viewing and editing.

Test with both bibliographic and authority records to confirm that the
correct view and edit pages open for each.

EDIT: Add permission check for "Edit" link
Comment 6 Fridolin Somers 2021-08-20 06:34:32 UTC
Super, I like that
Comment 7 Fridolin Somers 2021-08-20 06:35:09 UTC
Created attachment 123986 [details] [review]
Bug 28843: Add view and edit buttons to result of MARC record import

This patch adds "View" and "Edit" buttons to the output of the result of
a MARC record import.

To test, apply the patch and go to Tools -> State MARC for import.

 - Import a file of MARC records.
 - Click the "Manage staged records" button.
 - In the table of staged records the last column labeled "Records"
   should be empty.
 - Click "Import this batch into the catalog."
 - The table of records will be shown again, and this time the last
   column should contain "View" and "Edit" buttons for each row.
 - Confirm that the buttons work correctly, opening the correct record
   for viewing and editing.

Test with both bibliographic and authority records to confirm that the
correct view and edit pages open for each.

EDIT: Add permission check for "Edit" link
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 8 Katrin Fischer 2021-08-29 11:05:25 UTC
I like :)
Comment 9 Katrin Fischer 2021-08-29 11:06:14 UTC
Created attachment 124220 [details] [review]
Bug 28843: Add view and edit buttons to result of MARC record import

This patch adds "View" and "Edit" buttons to the output of the result of
a MARC record import.

To test, apply the patch and go to Tools -> State MARC for import.

 - Import a file of MARC records.
 - Click the "Manage staged records" button.
 - In the table of staged records the last column labeled "Records"
   should be empty.
 - Click "Import this batch into the catalog."
 - The table of records will be shown again, and this time the last
   column should contain "View" and "Edit" buttons for each row.
 - Confirm that the buttons work correctly, opening the correct record
   for viewing and editing.

Test with both bibliographic and authority records to confirm that the
correct view and edit pages open for each.

EDIT: Add permission check for "Edit" link
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-08-30 15:12:26 UTC
Pushed to master for 21.11, thanks to everybody involved!