Bug 450502

Summary: "Remove entry for this language" deletes all caption, not just the selected one.
Product: [Applications] digikam Reporter: Peter <benedekppeter>
Component: Tags-CaptionsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.6.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:

Description Peter 2022-02-18 07:03:14 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Description -- Captions "Remove entry for this language"
When multiple images are selected, and the caption language is different, if you delete caption, digikam will delete all captions in all languages.

STEPS TO REPRODUCE
1. Photo 1: Add a caption in x-default: A
2. Apply
3. Photo 2: Add a caption in zu-ZA: B
4. Apply
5. Photo 3: Add a caption in zh-TW: C
6. Apply
7. Select the three photos: CTRL + click A photo, B photo, C photo
8. In this case the language selector in the captions field shows "zh-TW" and "C" caption in the captions text field. 
9. Click "Remove entry for this language" button and press Apply button.

OBSERVED RESULT
"Remove entry for this language" deletes all caption, not just the selected one.

EXPECTED RESULT
Remove entry for this language! Only for selected language!

SOFTWARE/OS VERSIONS
Windows: Windows 10
Linux/KDE Plasma: LinuxMint 20.3 (digikam appimage)
(available in About System)
Comment 1 Peter 2022-02-18 07:17:53 UTC
Addition:
"Remove entry for this language" deletes all caption, not just the selected one, and caption of the all photos!

If photo 3 contain another caption before clicking the remove button  (example: wo-SN: test), this caption will be added to all selected photos!
Comment 2 Maik Qualmann 2022-02-18 09:26:22 UTC
Gilles,

I think we could add a "defined DEBUG" here to only have the output in the debug bundle.

https://invent.kde.org/graphics/digikam/-/blob/master/core/app/utils/digikam_debug.cpp#L81

Maik
Comment 3 Maik Qualmann 2022-02-18 09:27:08 UTC
Sorry, wrong bug number for comment 2.

Maik
Comment 4 Peter 2023-04-25 04:26:43 UTC
The solution to this problem can be found in the Batch Queue Manager. (in the digiKam 8.x)
Metadata -- Assign Captions
Without the "Clear and Overwrite" switch, the function works as expected!
Excellent!

Question:
Why doesn't work like this by default in digiKam?
Why no "Clear and Overwrite" switch in the basic user interface?
Comment 5 Peter 2023-04-25 04:36:54 UTC
Oops! I just noticed that the bug has already been fixed!
Please ignore my previous (2023-04-25 04:26:43 UTC) comment!
This ticket can be closed.