Project

General

Profile

feature request #6527

Refactor delete configurator for media

Added by Patrick Plitzner over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
03/21/2017
Due date:
% Done:

50%

Severity:
major

Description

Hallo Katja, Patrick,

ich habe gerade aus dem Media View für Taxa versucht Bilder zu löschen.

Funktioniert auch, aber die Konfiguratoreinstellungen verstehe ich noch nicht ganz bzw. müssten noch angepasst werden:

· Es fehlt sowohl die anzeige der Defaulteinstellung. Am Anfang ist keine der beiden Alternativen ausgewählt. Welches ist denn die Defaulteinstellung?

· Die Option „Lösche das Medianobjekt, auch wenn es von einem Specimen verwendet wird“ verstehe ich nicht ganz. Welcher spezielle Usecase soll hier behandelt werden?

· „Medienobjekt“ finde ich keinen so glücklichen Begriff. Besser Mediendatensatz? Objekt klingt so nach dem eigentlichen Objekt, also dem Foto, oder so. Objekt im Sinne von Programmierung ist den meisten Nutzern kein Begriff.


Related issues

Related to Edit - bug #6664: Deleting often does not succeed without throwing an exception Closed 05/22/2017

Associated revisions

Revision 7bd84a66 (diff)
Added by Patrick Plitzner over 1 year ago

ref #6527 Refactor configurator composite

Revision 6c08dd61 (diff)
Added by Katja Luther over 1 year ago

ref #6527: define default for media deletion

Revision 55031c8b (diff)
Added by Katja Luther over 1 year ago

fix #6527: refactor media deletion configurator and the corresponding wizard

Revision 3df8a478 (diff)
Added by Katja Luther over 1 year ago

ref #6527: fix isDeletable method for media

Revision b0277a63 (diff)
Added by Katja Luther over 1 year ago

ref #6527: adapt delete operation to show up error dialog

Revision ed33cbd7 (diff)
Added by Katja Luther over 1 year ago

ref #6527: change the labels for media deletion config and remove undeletable media from gallery

History

#1 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.7 to Release 4.8

#2 Updated by Katja Luther over 1 year ago

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

#3 Updated by Katja Luther over 1 year ago

  • Assignee changed from Katja Luther to Andreas Müller

#4 Updated by Andreas Müller over 1 year ago

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

„Medienobjekt“ finde ich keinen so glücklichen Begriff. Besser Mediendatensatz? Objekt klingt so nach dem eigentlichen Objekt, also dem Foto, oder so. Objekt im Sinne von Programmierung ist den meisten Nutzern kein Begriff.

This has not been changed yet.

#5 Updated by Andreas Müller over 1 year ago

· Die Option „Lösche das Medianobjekt, auch wenn es von einem Specimen verwendet wird“ verstehe ich nicht ganz. Welcher spezielle Usecase soll hier behandelt werden?

CRITICAL: you have removed the according checkbox, but as far as what I can see the following happens now:

If you choose "delete the media object" the media is removed even if linked by a specimen description (or maybe any other link). This should not be possible. The specimen link is even not removed from the DB but links to a not existing record. This is very critical as it results in inconsistent data.

We should adapt the label to "Delete media record from database if possible" and implement this option in a way that it is not possible to delete if linked from elsewhere.

By the way I would set the default to this option because I don't think people expect media to stay in the database if removed from image gallery but not referenced elsewhere.

#6 Updated by Andreas Müller over 1 year ago

  • Severity changed from normal to critical

I just realized that also in the Media bulk editor CRITICAL things happen. Even if you do NOT check "Delete the media object even if it is part of a taxon description", the media is deleted if it is part of a taxon description. The related image gallery afterwards links to a missing record. Very bad (Trump speech).

I wonder that hibernate allows creation of such corrupted data.

#7 Updated by Katja Luther over 1 year ago

Andreas Müller wrote:

I just realized that also in the Media bulk editor CRITICAL things happen. Even if you do NOT check "Delete the media object even if it is part of a taxon description", the media is deleted if it is part of a taxon description. The related image gallery afterwards links to a missing record. Very bad (Trump speech).

I wonder that hibernate allows creation of such corrupted data.

This is fixed by the fix of the isDeletable method.

#8 Updated by Katja Luther over 1 year ago

Andreas Müller wrote:

· Die Option „Lösche das Medianobjekt, auch wenn es von einem Specimen verwendet wird“ verstehe ich nicht ganz. Welcher spezielle Usecase soll hier behandelt werden?

CRITICAL: you have removed the according checkbox, but as far as what I can see the following happens now:

If you choose "delete the media object" the media is removed even if linked by a specimen description (or maybe any other link). This should not be possible. The specimen link is even not removed from the DB but links to a not existing record. This is very critical as it results in inconsistent data.

We should adapt the label to "Delete media record from database if possible" and implement this option in a way that it is not possible to delete if linked from elsewhere.

By the way I would set the default to this option because I don't think people expect media to stay in the database if removed from image gallery but not referenced elsewhere.

This is done, but I used the term media data, because I think media record is also a technical term??
But I can also change it to media record.

#9 Updated by Katja Luther over 1 year ago

  • Assignee changed from Katja Luther to Andreas Müller

please review

#10 Updated by Andreas Müller over 1 year ago

  • Status changed from Feedback to Resolved

#11 Updated by Andreas Müller over 1 year ago

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

Andreas Müller wrote:

By the way I would set the default to this option because I don't think people expect media to stay in the database if removed from image gallery but not referenced elsewhere.

This seems not be implemented yet. Or did you keep the default on purpose?

#12 Updated by Andreas Müller over 1 year ago

Katja Luther wrote:

This is done, but I used the term media data, because I think media record is also a technical term??
But I can also change it to media record.

The title still says "Wollen sie wirklich das Medienobjekt löschen?", please change to "... die Mediendaten...".

Further more in option 1 you say "Lösche die Mediendaten" while in option 2 you say "Entferne Mediendaten". Either both times use "die" or never. I prefer not to use it.

Further more I suggest to add "Lösche Mediendaten aus der Datenbank, wenn ...". This makes the distinction to option 2 most clear where we say "... aus der Gallerie"

#13 Updated by Andreas Müller over 1 year ago

In German I would prefer "Wollen Sie die Mediendaten wirklich löschen?" statt "Wollen Sie wirklich die Mediendaten löschen.

#14 Updated by Andreas Müller over 1 year ago

If choosing "Delete media data, if not referenced by other data" now returns a kind of error saying that it is not possible to delete, because the media data is referenced (at least if the media data is really used elsewhere).
The media is NOT removed from the gallery.

This is not the expected behavior. I would expect that the media is removed from the gallery but a warning is given, that it could not be completely removed from the database because it is used elsewhere. This is something we have already elsewhere (I think when deleting taxa and checking if the name can also be deleted or something similar).

This is also why I originally suggested to say "Delete media data if possible". Maybe we can change the label to "Remove media data from gallery and remove from database if possible/if not referenced elsewhere". Too long?

#15 Updated by Andreas Müller over 1 year ago

By the way, we may need the same configurator for "Image gallery delete". To me it looks like this currently does not delete the media completely but only deletes the image gallery while the media are still in the DB. The same might be true for deleting the complete taxon or even taxon subtrees. We need to integrate this to all configurators. Feel free to create new ticket(s) for this.

#16 Updated by Andreas Müller over 1 year ago

  • Related to bug #6664: Deleting often does not succeed without throwing an exception added

#17 Updated by Andreas Müller over 1 year ago

  • Severity changed from critical to major

The critical delete itself seems to work now. However, there is a very similar case described in #6730.

#18 Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Closed

the remaining issues will be handled in #6730, and this ticket is closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)