Course Materials Forms Should Not Allow Carriage Return to Activate the “Add Material” or “Add User” Button

Bug #1930896 reported by Beth Willis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.8
Fix Released
Medium
Unassigned

Bug Description

When associating items with a course, the item barcode is the first element of the form. If the user scans the barcode (or types it in and presses the “enter” key), the item is added to the course immediately. This means that the user does not have the opportunity to add or edit values for the remaining fields on the form. At libraries in our consortium users will need to edit item data (e.g. shelving location, circulation modifier) for items placed on reserve.

The same behavior occurs if the user chooses to add materials using the “Associate Brief Record” option on the course materials tab. If the user presses “enter” in the Title, Uniform Resource Identifier or Link Text entry boxes, the item is added to the course and the user does not have the option to add data for the following fields.

The same behavior also occurs on the “Course Users” tab. If the user scans a barcode (or types it in and presses the “enter” key) the course user is attached to the course before the user “Role” can be selected.

This behavior is especially problematic because there is no way to edit the item / user data within the course module. See related bug: https://bugs.launchpad.net/evergreen/+bug/1907927

These forms should not allow a carriage return to activate the Add Material button.

Steps to test:

Open the Course Materials module
Select a course
Select the “Course Materials” tab
Select the “Associate Item” option
Scan an item barcode (or type the barcode and press the “enter” key)
Observe that the item is added to the course before the following fields can be edited: Relationship. Call Number, Circulation Modifier, Item Status, Shelving Location

EG 3-6-2

Beth Willis (willis-a)
description: updated
Kyle Huckins (khuckins)
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Revision history for this message
Kyle Huckins (khuckins) wrote :
Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
tags: added: pullrequest
Revision history for this message
Garry Collum (gcollum) wrote :
tags: added: signedoff
Revision history for this message
Beth Willis (willis-a) wrote :

I think there is still a problem with the option to "Associate brief record" with the course (paragraph 2 in original bug report). This option allows the user to create a new record to associate with the course. This option is intended to allow for non-cataloged electronic resources to be attached to the course. If the user presses the "enter" key after adding the title of the resource (See screenshot 1), the form is submitted, preventing the user from adding the URI or link text. The form is also submitted if "enter" is pressed from the URI field. The form should only be submitted if the user presses the "Add material" button.

Additionally, when the form is submitted, the resource is added to the list of course materials and the record is added to the database. But, the record does not include the 856 field. (See screenshot 2)

Also, the field that was active when “enter” is pressed no longer displays on the screen. This may not cause any problems, but looks odd. I think the form should refresh here. (See screenshot 3)

Tested on EG 3-7-2

Revision history for this message
Kyle Huckins (khuckins) wrote :

Thanks for the catch, Beth! I've pushed an additional commit to affect the Simple Marc Editor, ensuring carriage returns won't pre-emptively submit the form. This seems safe to do, as the Simple Marc Editor only appears to be used in situations where the carriage return to submit isn't ideal. The 856 should now exist as expected.

The latest commit doesn't address the disappearing fields upon submission - this might be worth its own launchpad bug, as it will affect any UI using the Simple Marc Editor.

Revision history for this message
Beth Willis (willis-a) wrote :

Kyle,

Apologies for neglecting to attach my screenshots--apparently they weren't necessary.

I noticed that even when completing the "Associate Brief Record" form and submitting with the "Add materials" button, the 856 field was not added to the record. Does the new commit also address this situation?

Revision history for this message
Kyle Huckins (khuckins) wrote :

It should - Upon associating a brief record, I navigated to the record and checked it in the Marc Viewer, and the 856 u, y, and 9 subfields were all present

Revision history for this message
Beth Willis (willis-a) wrote :

Kyle,

I'm afraid I still am not seeing an 856 field in the newly created MARC record when I add an e-resource to course materials via the "Associate brief record" option. My test bib record is attached.

Revision history for this message
Kyle Huckins (khuckins) wrote :

This is very odd, I'm having trouble replicating this behavior. The steps I'm taking are:

1. In Course Materials, navigate to Associate Brief Record
2. Add a title
3. Click Add Material
4. Click on the title of the newly added material
5. Navigate to the MARC Edit for the new item

The 856 field is present, with the 9 subfield value set to my workstation org unit. If I supply a resource identifier and/or link text, those are placed in the u and y subfields, respectively.

Is there possibly a step I'm missing, or extra step I'm taking? I'm not sure what would be causing the discrepancy

Revision history for this message
Beth Willis (willis-a) wrote :

EG 3-7

When associating a brief record with a course, the MARC 856 fieldy, along with the appropriate subfields, IS added to the record correct. The issue I reported previously resulted from the 856 field being stripped from the record due to our local "trash field" settings.

I have tested this code and consent to signing off on it with my name, Beth Willis, and my email address, <email address hidden>.

Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.8.1
Changed in evergreen:
milestone: 3.8.1 → none
Changed in evergreen:
milestone: none → 3.9.1
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Kyle, Garry, and Beth! Pushed to 3.8 and above.

Changed in evergreen:
importance: Undecided → Medium
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
no longer affects: evergreen/3.7
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

It looks like the first commit from Kyle's branch was signed off and committed to master, but not this follow-up commit:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=c928411f

Do we need this one too?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.