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

RESOLVED FIXED

Status

Mozilla QA
MozTrap
--
enhancement
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: camd, Unassigned)

Tracking

(Depends on: 1 bug)

Details

(Reporter)

Description

7 years ago
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?
(Reporter)

Comment 1

7 years ago
A Pivotal Tracker story has been created for this Bug: http://www.pivotaltracker.com/story/show/17979107
(Reporter)

Comment 2

7 years ago
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.
(Reporter)

Comment 3

7 years ago
Cameron Dawson added a comment in Pivotal Tracker:   
   
created platform story for this: https://www.pivotaltracker.com/story/show/18546061
(Reporter)

Updated

7 years ago
Depends on: 687905
(Reporter)

Comment 4

7 years ago
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.
(Reporter)

Comment 5

7 years ago
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.
(Reporter)

Comment 6

7 years ago
Carl Meyer changed story state to started in Pivotal Tracker
(Reporter)

Comment 7

7 years ago
Carl Meyer changed story state to delivered in Pivotal Tracker
(Reporter)

Comment 8

7 years ago
Carl Meyer changed story state to delivered in Pivotal Tracker
(Reporter)

Comment 9

7 years ago
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.
(Reporter)

Comment 10

6 years ago
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.
(Reporter)

Comment 11

6 years ago
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.  :)
(Reporter)

Comment 12

6 years ago
Cameron Dawson changed story state to accepted in Pivotal Tracker
(Reporter)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.