Reporter shows "Action Succeeded" when in reality, it didn't

Bug #842991 reported by Michael Peters
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.5
Fix Released
Medium
Unassigned

Bug Description

Evergreen 2.0.4
OpenSRF 2.0.0
PostgreSQL 8.4
Debian Squeeze

When attempting to delete a report template, owned by "User A" which is referred to by reports created by "User B" the staff client reports that the action succeeded when in reality, it does not, due to still being used by other users.

We shouldn't be sending a misleading message so there needs to be some kind of indication to the user that the deletion was unsuccessful.

Changed in evergreen:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Needs confirmation in 2.1+.

Changed in evergreen:
status: Confirmed → Incomplete
Changed in evergreen:
status: Incomplete → Triaged
Revision history for this message
Jason Boyer (jasonb-myjclibrary) wrote :

I can confirm that I've seen this still on 2.2.2. I've tried to delete templates other users have built reports against and received a false success message, and also when trying to move a report from one folder to another that would cause a duplicate name conflict.

Revision history for this message
Remington Steed (rjs7) wrote :

This behavior still exists in 2.5. Also, if you own any reports attached to the template you are trying to delete, those are successfully deleted. The code looks like it throws an error when it finds a report owned by a different user, but that apparently isn't working. Here's where I'm looking:

web/reports/oils_rpt_folder_window.js: 420
oilsRptFolderWindow.prototype.deleteTemplates = function(...
...
    if( tmpl.owner().id() != USER.id() ) {
        this.deleteTemplates(list, ++idx,
            callback, 'oils_rpt_folder_contents_no_delete');

Revision history for this message
Remington Steed (rjs7) wrote :

It looks like the javascript was just missing a check for the case of partial failure. This branch should take care of it.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/rsteed/reporter_wrongly_shows_success

working/user/rsteed/reporter_wrongly_shows_success

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.next
Remington Steed (rjs7)
Changed in evergreen:
milestone: 2.next → 2.5.1
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.5.1 → 2.5.2
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.2 → 2.6.0-alpha1
Revision history for this message
Dan Wells (dbw2) wrote :

Works for me. Pushed to master and backported through rel_2_4. Thanks, Remington!

Changed in evergreen:
status: Triaged → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
no longer affects: evergreen/2.4
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.