bug #5692
closedDelete a person within the bulk editor deletes the person even if not saved
100%
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
Updated by Andreas Müller almost 8 years ago
- Description updated (diff)
- Priority changed from New to Highest
Updated by Andreas Müller almost 8 years ago
- Target version changed from Unassigned CDM tickets to Release 4.4
- Estimated time set to 2:00 h
Updated by Katja Luther almost 8 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.
Updated by Andreas Müller almost 8 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.
Updated by Katja Luther almost 8 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.
Updated by Katja Luther almost 8 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.
Updated by Andreas Müller almost 8 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.
Updated by Andreas Müller almost 8 years ago
Whatever solution we choose please cover it with an according test.
Updated by Katja Luther almost 8 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.
Updated by Katja Luther almost 8 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset taxeditor:commit:taxeditor|7dce04a4ef06e30769a711c8b6aceb11b2137c31.
Updated by Katja Luther almost 8 years ago
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller almost 8 years ago
- Related to bug #6174: LIE when deleting new name added
Updated by Andreas Müller almost 8 years ago
- Related to bug #6175: Exception when deleting transient object added
Updated by Andreas Müller almost 8 years ago
- Related to bug #6176: Creating a new Reference throws TOE (TransientObjectException) added
Updated by Andreas Müller almost 8 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.
Updated by Andreas Müller almost 8 years ago
Updated by Katja Luther almost 8 years ago
The media bulk editor is fixed now see Revision f1a1a089. The problem of deleting a transient object still exists.
Updated by Katja Luther almost 8 years ago
- Related to deleted (bug #6176: Creating a new Reference throws TOE (TransientObjectException))
Updated by Katja Luther almost 8 years ago
- Status changed from Feedback to Resolved
The transient objects can be deleted now without exception see #6175
Updated by Katja Luther almost 8 years ago
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller almost 8 years ago
- Status changed from Resolved to Closed
- Assignee changed from Andreas Müller to Katja Luther
Seems to be fully fixed now. Great.