-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting a subject set removes subjects that are still members of other sets #4250
Comments
The subject remover doesn't reflect on the subject's linked sets. It only asks panoptes/lib/subjects/remover.rb Lines 31 to 40 in 377fc00
and then removes all the SetMemberSubjects entries if true. If a subject has been acted upon (classified, retired, commented, collected) on any workflow, on any project, then that subject is not orphaned and will be left. Just being linked to any set anywhere doesn't prevent a subject from being removed. So in order to make this work, I'd modify the SubjectRemover to take a subject set id (if applicable) as an additional param along with the SubjectRemovalWorker that uses it and everywhere that calls that worker. Wouldn't affect subjects for which the removal worker was called directly (via SubjectsController) but would work for calls from SubjectSetsController and SetMemberSubjects controller. I'll add it to the list! |
Note -- this is also an issue when cross-project subjects are in use. Example: one project team might delete a subject set and that could have the possible result of deleting the subject from all projects. Especially because the deletion could be / would be unexpected, best if we do not allow deletion if subject is linked elsewhere. |
@zwolf @lcjohnso I'm not quite sure I follow this ^ quoted part. If the removal call was called via SubjectsController, wouldn't we still want this additional check of "don't remove subject if subject belongs to a different subject set"? (Especially with Cliff's followup note) I feel like I'm missing something so hopefully either of you can explain. MAIN QUESTION: I'm wondering why adding optional (I.e. if panoptes/lib/subjects/remover.rb Line 13 in 377fc00
|
Follow up on above ^ and posting follow up discussion had by BE team (Mar 21, 2024):
Decision:We decided to implement fix proposed in Zach's comment: #4250 (comment) This will take care of this current issue. BUT what it does not take care of is if remover is called from |
The subject remover (
panoptes/lib/subjects/remover.rb
Line 31 in 377fc00
The text was updated successfully, but these errors were encountered: