Project

General

Profile

Actions

bug #5692

closed

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

Added by Andreas Müller about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
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 nameClosedKatja Luther

Actions
Related to EDIT - bug #6175: Exception when deleting transient objectClosedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller over 7 years ago

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

Updated by Andreas Müller over 7 years ago

  • Target version changed from Unassigned CDM tickets to Release 4.4
  • Estimated time set to 2:00 h
Actions #3

Updated by Katja Luther over 7 years ago

This is the same for taxa and names.

Actions #4

Updated by Katja Luther over 7 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.

Actions #5

Updated by Andreas Müller over 7 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.

Actions #6

Updated by Katja Luther over 7 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.

Actions #7

Updated by Katja Luther over 7 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.

Actions #8

Updated by Andreas Müller over 7 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.

Actions #9

Updated by Andreas Müller over 7 years ago

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

Actions #10

Updated by Katja Luther over 7 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.

Actions #11

Updated by Katja Luther over 7 years ago

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

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

Actions #12

Updated by Katja Luther over 7 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #13

Updated by Andreas Müller over 7 years ago

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

Updated by Andreas Müller over 7 years ago

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

Updated by Andreas Müller over 7 years ago

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

Updated by Andreas Müller over 7 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.

Actions #17

Updated by Andreas Müller over 7 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.

Actions #18

Updated by Katja Luther over 7 years ago

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

Actions #19

Updated by Katja Luther over 7 years ago

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

Updated by Katja Luther over 7 years ago

  • Status changed from Feedback to Resolved

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

Actions #21

Updated by Katja Luther over 7 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #22

Updated by Andreas Müller over 7 years ago

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

Seems to be fully fixed now. Great.

Actions #23

Updated by Andreas Müller over 7 years ago

  • % Done changed from 50 to 100
Actions #24

Updated by Andreas Müller over 7 years ago

  • Private changed from Yes to No
Actions

Also available in: Atom PDF