Project

General

Profile

bug #6952

Deleting terms does not get reflected in the UI and in the DB

Added by Patrick Plitzner about 2 years ago. Updated 10 months ago.

Status:
In Progress
Priority:
Highest
Assignee:
Category:
taxeditor
Start date:
09/15/2017
Due date:
% Done:

50%

Severity:
normal
Found in Version:

Description

If you delete a term in the term editor nothing happens in the UI.
After reconnecting and re-opening the term editor, the term is gone but it is still is the DB.

This seems to be related to #6951 because it works for terms that have the vocabulary as parent but not if they have another term as parent.

Another issue: If a term (with vocabulary as parent) is deleted, the term editor gets dirty but the term has actually been already deleted in the database making it impossible to revert your changes.


Related issues

Related to Edit - bug #6951: Drag and drop does not update term hierarchy in the UI Closed 09/15/2017
Related to Edit - feature request #7887: Use DTOs in term editor Closed 11/05/2018

Associated revisions

Revision 8edb3fc3 (diff)
Added by Patrick Plitzner 10 months ago

ref #6952 Temporarily disallow deletion of non-empty vocabularies

History

#1 Updated by Patrick Plitzner about 2 years ago

  • Related to bug #6951: Drag and drop does not update term hierarchy in the UI added

#2 Updated by Andreas Müller about 2 years ago

  • Description updated (diff)

#3 Updated by Andreas Müller about 2 years ago

After reconnecting and re-opening the term editor, the term is gone but it is still is the DB.

What happens in the DB is that the partOf relationship is deleted (partOf_id = NULL) and also the term is removed from the vocabulary (vocabulary_id = NULL), but the DefinedTermBase record itself is still in the DB. Therefore it does not appear in the Term Editor after reconnect.

#4 Updated by Patrick Plitzner about 1 year ago

  • Status changed from New to Resolved
  • Target version changed from Unassigned CDM tickets to Release 5.5
  • % Done changed from 0 to 50

This issue is fixed with the implementation of DTOs in the term editor #7887

#5 Updated by Patrick Plitzner about 1 year ago

#6 Updated by Patrick Plitzner 11 months ago

  • Assignee changed from Katja Luther to Andreas Müller

This issue should be reviewed

#7 Updated by Andreas Müller 11 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

This is partly fixed. Deleting a single term works. The following issues do not yet work as expected:

  1. Deleting a vocabulary does not delete the terms within the vocabulary (do we need cascading.Delete for this?)
  2. Deleting a term which is not a leave but a node with children, this is not possible. A warning appears that the term is referenced (by it's children). Better handling here is to ask how the children should be handled (delete the whole subtree, attach children to parent, cancel). This is already correctly implemented in taxon navigator and should be standard for all tree editors. Please have a look there.

#8 Updated by Patrick Plitzner 10 months ago

Andreas Müller wrote:

This is partly fixed. Deleting a single term works. The following issues do not yet work as expected:

  1. Deleting a vocabulary does not delete the terms within the vocabulary (do we need cascading.Delete for this?)
  2. Deleting a term which is not a leave but a node with children, this is not possible. A warning appears that the term is referenced (by it's children). Better handling here is to ask how the children should be handled (delete the whole subtree, attach children to parent, cancel). This is already correctly implemented in taxon navigator and should be standard for all tree editors. Please have a look there.

I did not change the logic of the delete operation when refactoring the term editor to use DTOs. So this must have worked the same way as before. There is also no specific delete method in the vocabulary service. So we have to decide if this should be done via Cascading or if we implement the recursive deletion in the service method.

For now, I just disallow the deletion of vocabularies that are not empty

#9 Updated by Andreas Müller 10 months ago

  • Assignee changed from Patrick Plitzner to Katja Luther

Katja, could you have a look on the delete issue as you have the most experience with delete handling.

#10 Updated by Katja Luther 10 months ago

  • Status changed from Feedback to In Progress
  • Priority changed from New to Highest
  • Target version changed from Release 5.5 to Release 5.6

I will do that in the next release

#11 Updated by Andreas Müller 10 months ago

  • Target version changed from Release 5.6 to Reviewed Next Major Release

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)