feature request #6527
closedRefactor delete configurator for media
50%
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
Updated by Andreas Müller over 7 years ago
- Target version changed from Release 4.7 to Release 4.8
Updated by Katja Luther over 7 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset taxeditor|55031c8b54ac487e9500d59ace74bc476a3931a1.
Updated by Katja Luther over 7 years ago
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller over 7 years 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.
Updated by Andreas Müller over 7 years 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.
Updated by Andreas Müller over 7 years 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.
Updated by Katja Luther over 7 years 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.
Updated by Katja Luther over 7 years 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.
Updated by Katja Luther over 7 years ago
- Assignee changed from Katja Luther to Andreas Müller
please review
Updated by Andreas Müller over 7 years ago
- Status changed from Feedback to Resolved
Updated by Andreas Müller over 7 years 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?
Updated by Andreas Müller over 7 years 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"
Updated by Andreas Müller over 7 years ago
In German I would prefer "Wollen Sie die Mediendaten wirklich löschen?" statt "Wollen Sie wirklich die Mediendaten löschen.
Updated by Andreas Müller over 7 years 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?
Updated by Andreas Müller over 7 years 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.
Updated by Andreas Müller over 7 years ago
- Related to bug #6664: Deleting often does not succeed without throwing an exception added
Updated by Andreas Müller over 7 years 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.
Updated by Katja Luther about 7 years ago
- Status changed from Feedback to Closed
the remaining issues will be handled in #6730, and this ticket is closed