Course Materials: Toast always reports Update Succeeded, even when it didn't

Bug #1913816 reported by Michele Morgan
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Jane Sandberg
3.7
New
Undecided
Unassigned

Bug Description

When adding or editing a course, and the course cannot be saved, the client always reports "Update Succeeded" in green, rather than "Update Failed".

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Taking a quick look at this and jotting down some notes. It seems like the pcrud service is sending out a Complete notification rather than an Error notification in some cases. Possibly the error happens when the transaction is committed? There's been some previous work there, but maybe it didn't handle all cases?: https://github.com/evergreen-library-system/Evergreen/commit/713598a0083197b9608042e3f58c4a5996d6a4c1

A reliable way to get these misleading toasts: try to save without the required Owning Library field.

tags: added: angular
Revision history for this message
Kyle Huckins (khuckins) wrote (last edit ):

Having difficulty replicating this. Has this been incidentally fixed since the bug was reported?
One interesting piece - I added in a button to set the course's owning library to null(which should make it unsaveable), I was able to get the update succeeded toast, however the update did go through. Poking at the sql, it appears all fields are optional. I've pushed a branch adding a NOT NULL to owning_library, and the toast correctly comes back as failed with no owning library supplied:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/khuckins/lp1913816-course-materials-owning-lib-required

I should note that just removing the text from the owning library selector won't change anything on the object being saved - the Course object will only change its Owning Library field when a valid selection is made in the selector.

To test that the owning library is being treated as required correctly, here's a branch with that button built on top: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/khuckins/lp1913816-course-materials-owning-lib-required-button-for-testing

tags: added: pullrequest
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.8.1
Revision history for this message
Blake GH (bmagic) wrote :

Noting that there is a conflict for cccf059a57dc9942b1e846272f1dc1ea890ed41b

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

Noting that this still seems to be a problem.

I was able to see toasts that reported success when the action actually failed on the test server (https://bugsquash.mobiusconsortium.org/eg/staff) by trying to update a course that I didn't have permission to update.

I logged into a BR1 workstation as the user br1mtownsend who has permission to MANAGE_RESERVES at the branch level. In the Course Reserves List, I clicked on +Ancestors so I could see the History of Indonesia course that is owned by CONS.

I selected that course and chose Edit Selected. There I changed the name and course number and clicked Save. I got a toast that said my update succeeded, but when I refreshed the Course List, the course was unchanged. So at least for the case where the staff user doesn't have permission, the toasts are erroneously reporting success.

Changed in evergreen:
milestone: 3.8.1 → none
Revision history for this message
Terran McCanna (tmccanna) wrote :

Removed pullrequest per testing comment #4

tags: added: needswork
removed: pullrequest
tags: added: needsrebase
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

The underlying cause for this one is bug 1808016 -- marking this as a duplicate of it.

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.