Course materials table needs date fields

Bug #1923057 reported by Beth Willis
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

The asset.course_module_course_materials table should include date fields to track the association of the item with a specified course. There should be a field to indicate when the item was put on reserve and a field to indicate when it was removed from reserve (or when the course itself was archived). These dates are important for generating accurate circulation statistics for reserve materials.

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

The date fields specified in the original bug report should also display in the client as selectable columns in the grid and should be accessible from the EG reporter.

Kyle Huckins (khuckins)
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Revision history for this message
Kyle Huckins (khuckins) wrote :

I've pushed a branch here:;a=shortlog;h=refs/heads/user/khuckins/lp1923057-course-materials-disassociate-rework

1915556 covers the placed on reserve portion of this, as it includes a "create_time" field for the DB object, so this branch is built atop it. The design of the Course Reserves module has Course Materials set to be deleted entirely upon archival of a course/detachment from a course - this patch reworks this, persisting a disassociated item, while providing a new boolean, is_active, which controls whether or not the item is shown to users on the OPAC.

A future card could expand on this, allowing staff to reassociate items, which would require some tweaks to the associateMaterials function in the EG2 Course Service.

tags: added: pullrequest
Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
Revision history for this message
Beth Willis (willis-a) wrote (last edit ):

EG 3-8-0

When an item is disassociated from a course, the course number still displays in the staff client in the last column of the item table. The course name and number also display in the staff client record summary. (Please see attached screenshots.)

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

A second screenshot.

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

EG 3-8-0

The is_active and removal_time fields are updated in the database when an item is disassociated from a course and when it is individually disassociated from a course. One minor issue that I have noticed is that while the removal_time date is accurate, the actual timestamp is off by a few hours.

These two fields also display correctly on the Course Materials page grid.

Before signing off on this bug, further testing is needed to verify that the is_active and removal_time fields update correctly when archiving and unarchiving of an entire course. I do not currently have this patch on our test server.

As Kyle mentioned in comment #2, currently there is no way to reassociate an item with a course. A separate bug should be opened for this issue, which would really enhance the course materials module significantly.

Changed in evergreen:
status: New → Confirmed
Changed in evergreen:
importance: Undecided → Wishlist
Revision history for this message
Terran McCanna (tmccanna) wrote :

It appears that this patch is built upon the work from bug 1915556 which needs a rebase first.

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.