Bug 415592

Summary: When renaming a tag, if I say no to updating, clicking Save won't trigger update again
Product: [Applications] digikam Reporter: jasonb
Component: Tags-ManagerAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 6.4.0   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:

Description jasonb 2019-12-26 22:05:45 UTC
SUMMARY

I used Tag Manager to rename a tag associated with a large number of images. This triggers the "This operation can take a long time..." dialog box. If I click No, then click Save again in the Tag properties pane again for the tag, the dialog does not reappear.

The only way to commit this change is to modify the tag again, then click Save, and then Yes when the "This operation can take a long time..." dialog appears again.

STEPS TO REPRODUCE
1. Open Tag Manager
2. Select a tag associated with a large number of images so that the "This operation..." warning will appear.
3. Change the tag 'Title' in the Tag Properties pane.
4. Click Save.
5. When the "This operation..." dialog appears, click No.
6. Click Save again.
7. Confirm that the file metdata has not changed. (I commit my XMP files to `git`, so I ran `git status` to see that no changes took place.)
8. Change the tag 'Title' again.
9. Click Save.
10. When the "This operation..." dialog appears, click Yes.
11. Confirm that the file metadata was changed by digiKam.

OBSERVED RESULT

The file metadata is not updated.

EXPECTED RESULT

Every time I click Save, I am prompted whether I want to perform the operation or not. If I click Yes, the metadata is updated. If I click No, the metadata is not updated.

For a rarely used tag, if I change its title, it appears digiKam will always update the file metadata. For a commonly used tag, if I click No when warned "This operation can take a long time...", the only way to get the metadata updated after is to modify the Title again, and then click Save.

If I forget to do this, I probably need to go into Tools > Maintenance and manually sync to disk, but if I forget to do this, my database and XMP files will be out of sync.

macOS: 10.15.2
Rev: d4189399d3b
Comment 1 Maik Qualmann 2019-12-26 22:18:38 UTC
This behavior is so intentional, since it can take a very long time to write a lot of metadata into the images. It was the wish of users to introduce a dialog here. If you want your metadata to be in sync, always click yes. You can also set the CheckBox "Do not ask again..." so that no questions are asked again in this session.

Maik
Comment 2 jasonb 2019-12-26 22:26:31 UTC
Yes, that make sense.

However, if I click "No", and forget to commit my changes to my XMP files at some other point in time via a different method, then the XMP files are not updated.

If I click No, does digiKam still update the metadata in the database itself? Or does no metadata update happen at all?

If I click No, then make some unrelated change that triggers a metadata update to the XMP file, are all outstanding changes committed?

I don't want to find myself in a situation where an outstanding metadata change does not get committed, I am unaware of it, and then it gets lost somehow permanently.
Comment 3 Maik Qualmann 2019-12-27 07:13:09 UTC
If you click on no, only the metadata in the images will not be updated. This does not affect the database. To be in sync, you would have to write the metadata in the images later using the maintenance tool.

Maik