Closed Bug 674566 Opened 13 years ago Closed 12 years ago

cascading delete: a user should be able to delete a product that has associated objects

Categories

(Mozilla QA Graveyard :: MozTrap, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: camd, Unassigned)

References

(Depends on 1 open bug)

Details

currently, a user is not able to delete a product if Cycles, runs, suites and cases are associated with it.  We should be able to support this, even if it's not undo-able.

If this can't be undone, then we should warn the user of that, as it's a big transaction.

We should explore support for this at at different levels:
1. Deleting a product deletes cycles, runs, suites and cases
2. Deleting a cycle deletes runs

What about results?  Should deleting a cycle or run, then delete the results associated with that?
A Pivotal Tracker story has been created for this Bug: http://www.pivotaltracker.com/story/show/17979107
Carl Meyer added a comment in Pivotal Tracker:   
   
Cascade-deletion should be supported at the platform level, it'll be a lot more work and very slow to do it at the UI level item-by-item.
Cameron Dawson added a comment in Pivotal Tracker:   
   
created platform story for this: https://www.pivotaltracker.com/story/show/18546061
Depends on: 687905
Carl Meyer added a comment in Pivotal Tracker:   
   
This is something I should set up as I'm creating the models, but I need to know exactly which objects should be permitted to be cascade-deleted and which, if any, should prevent cascade deletion.
Cameron Dawson added a comment in Pivotal Tracker:   
   
Carl, Rebecca and I discussed this and here's what we decided:

1. Anything can be deleted and child items will cascade delete down.  After deleting, the user will get a message saying what was deleted (1 product, 20 cycles, 30 runs, etc) and an undo button in case they deleted it by mistake.

2. Things that can be soft deleted
    1. Cycle --> Runs --> Run Results
    2. Runs --> Run Results
    3. Suite --> nothing
    4. Cases --> all versions
    5. Product --> Cycles, Runs, Run Results, Suites, Cases

3. Undelete will be supported for these items (and handled in a separate story).  The date of delete will be recorded so that when they cascade undelete, it only undeletes items from the same transaction.

4. Users can't see deleted items at all.  Admins will have to recover them, possibly from within the admin interface.

5. Archiving will be a separate story.
Carl Meyer changed story state to started in Pivotal Tracker
Carl Meyer changed story state to delivered in Pivotal Tracker
Carl Meyer changed story state to delivered in Pivotal Tracker
Cameron Dawson added a comment in Pivotal Tracker:   
   
I wanted to test this from within the CC UI, not the admin.  will wait till that UI has landed.
Carl Meyer added a comment in Pivotal Tracker:   
   
Hmm, I'm wondering if it really makes sense to leave this story sitting here until we've got it in the UI. I put work into making sure it worked well via the admin, because my understanding from our earlier discussions was that it would be valuable if an admin could undelete things, even if the feature wasn't available via the regular UI. Given that adding undo to the UI is a separate story, which will go through its own acceptance stage, and it's not very high on the priority list (still in icebox, not even in backlog for 1.0), I think it would be better if this story could be tested and accepted on its own merits, by undeleting via the admin.
Cameron Dawson added a comment in Pivotal Tracker:   
   
Carl: fair enough.  I think I wanted to test at least the deletion part through the UI, not just through the admin and make sure the cascading delete happened.  But now that I can manage all (except envs) in the UI, you're right.  It's time to test and accept this.  

In reality, I'll need to test deleting through BOTH the UI and the admin, as a user might use either of them.  And Undelete through the admin may be our way to do this for some time to come.

thanks for the nudge.  :)
Cameron Dawson changed story state to accepted in Pivotal Tracker
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.