Project

General

Profile

bug #5692

Delete a person within the bulk editor deletes the person even if not saved

Added by Andreas Müller over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
04/13/2016
Due date:
% Done:

100%

Estimated time:
8.00 h
Severity:
critical
Found in Version:

Description

After delete in agent bulk editor the bulk editor shows * to indicate it is unsaved. Closing the editor with cancel does not keep the deleted record in the database.

This is critical because unexpected and may lead to wrong data.

see also #5706


Related issues

Related to Edit - bug #6174: LIE when deleting new name Closed 11/02/2016
Related to Edit - bug #6175: Exception when deleting transient object Closed 11/02/2016

Associated revisions

Revision 7dce04a4 (diff)
Added by Katja Luther about 3 years ago

fix #5692: adapt delete algorithm to annotatedLineEditor mechanisms

Revision f1a1a089 (diff)
Added by Katja Luther almost 3 years ago

fix the deletion of media in bulk editor

History

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

  • Description updated (diff)
  • Priority changed from New to Highest

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

  • Target version changed from Unassigned CDM tickets to Release 4.4
  • Estimated time set to 2.00 h

#3 Updated by Katja Luther about 3 years ago

This is the same for taxa and names.

#4 Updated by Katja Luther about 3 years ago

  • Estimated time changed from 2.00 h to 8.00 h

The problem seems to be that we have to use the @transactional(readonly=false) and this means that the commit is called automatically after finishing the method call.
If we remove the @transactional annotation the deletion is not commited at all because for the whole taxonService transactional is set to readOnly=true.
Maybe it can be solved by using another parameter for this annotation.

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

Katja Luther wrote:

The problem seems to be that we have to use the @transactional(readonly=false) and this means that the commit is called automatically after finishing the method call.
If we remove the @transactional annotation the deletion is not commited at all because for the whole taxonService transactional is set to readOnly=true.
Maybe it can be solved by using another parameter for this annotation.

Why should we use another parameter? Without knowing the concrete details readOnly=false seems reasonable to me as delete is not a readonly transaction.

#6 Updated by Katja Luther about 3 years ago

Andreas Müller wrote:

Katja Luther wrote:

The problem seems to be that we have to use the @transactional(readonly=false) and this means that the commit is called automatically after finishing the method call.
If we remove the @transactional annotation the deletion is not commited at all because for the whole taxonService transactional is set to readOnly=true.
Maybe it can be solved by using another parameter for this annotation.

Why should we use another parameter? Without knowing the concrete details readOnly=false seems reasonable to me as delete is not a readonly transaction.

But then it is saved right after calling the method it not possible to undo the delete call by not saving the editor. As long as we don't have a better solution I will change the bulk editor that the dirty flag is not set, after deleting the object.

#7 Updated by Katja Luther about 3 years ago

Katja Luther wrote:

Andreas Müller wrote:

Katja Luther wrote:

The problem seems to be that we have to use the @transactional(readonly=false) and this means that the commit is called automatically after finishing the method call.
If we remove the @transactional annotation the deletion is not commited at all because for the whole taxonService transactional is set to readOnly=true.
Maybe it can be solved by using another parameter for this annotation.

Why should we use another parameter? Without knowing the concrete details readOnly=false seems reasonable to me as delete is not a readonly transaction.

But then it saved right after calling the method it not possible to undo the delete call by not saving the editor.

I don't want to change the readonly=false, but maybe it is possible to avoid the automatic commit.

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

Katja Luther wrote:

Katja Luther wrote:
I don't want to change the readonly=false, but maybe it is possible to avoid the automatic commit.

This is not possible. As we do have single short transactions now we can't keep them open. A possible solution is to handle it similar to the deduplication algorithm where the entities to delete are remembered and are deleted/deduplicated only on save.
Another solution is to force save whenever a persisted object is deleted.

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

Whatever solution we choose please cover it with an according test.

#10 Updated by Katja Luther about 3 years ago

I adapted the deletion to the merging and added the delete configurator to the lineAnnotation. Now the objects are annotated as deleted and the real deletion takes place when the whole bulk editor is saved.
Before the object is annotated as deleted the isDeletable method is called.

#11 Updated by Katja Luther about 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

Applied in changeset taxeditor:commit:taxeditor|7dce04a4ef06e30769a711c8b6aceb11b2137c31.

#12 Updated by Katja Luther about 3 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#13 Updated by Andreas Müller almost 3 years ago

  • Related to bug #6174: LIE when deleting new name added

#14 Updated by Andreas Müller almost 3 years ago

  • Related to bug #6175: Exception when deleting transient object added

#15 Updated by Andreas Müller almost 3 years ago

  • Related to bug #6176: Creating a new Reference throws TOE (TransientObjectException) added

#16 Updated by Andreas Müller almost 3 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Looks like Media bulk editor is not yet fixed! All others seem to work.

#17 Updated by Andreas Müller almost 3 years ago

While testing I found 3 other issues that might be related. #6174, #6175, #6176. Please check if they are regressions before closing this ticket.

#18 Updated by Katja Luther almost 3 years ago

The media bulk editor is fixed now see Revision f1a1a089. The problem of deleting a transient object still exists.

#19 Updated by Katja Luther almost 3 years ago

  • Related to deleted (bug #6176: Creating a new Reference throws TOE (TransientObjectException))

#20 Updated by Katja Luther almost 3 years ago

  • Status changed from Feedback to Resolved

The transient objects can be deleted now without exception see #6175

#21 Updated by Katja Luther almost 3 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#22 Updated by Andreas Müller almost 3 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther

Seems to be fully fixed now. Great.

#23 Updated by Andreas Müller almost 3 years ago

  • % Done changed from 50 to 100

#24 Updated by Andreas Müller almost 3 years ago

  • Private changed from Yes to No

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)