https://bugs.kde.org/show_bug.cgi?id=413938

            Bug ID: 413938
           Summary: Metadata is not written to all pictures in a tag
                    hierarchy
           Product: digikam
           Version: 6.4.0
          Platform: Appimage
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Tags-Keywords
          Assignee: digikam-bugs-n...@kde.org
          Reporter: iwannaber...@gmail.com
  Target Milestone: ---

SUMMARY
This bug is derived from this tread in the mailing list:
http://digikam.1695700.n4.nabble.com/digiKam-users-Hierarchical-tags-how-are-they-stored-td4709630.html

In short, when creating a Tag hierarchy using existing tags by drag an dropping
tags in the tree view, the metadata change is not saved to all pictures
contained in the hierarchy (implying you are saving metadata to pictures, of
course). The particular situation can be a bit hard to explain, so please
fasten your seatbelts and I'll do my best.

As you know, a picture can be part of a tag hierarchy, but not necessarily
contain all tags in that hierarchy. For instance:

[x] Canada
    [ ] Ontario
        [x] Toronto

The picture in this case has the tags Toronto and Canada, but not Ontario,
although it's part of the hierarchy and it's located there in the tag tree, and
can be browsed as part of Ontario (if "Include Tag Sub-Tree" option is checked,
which is by default).

Usually, doing changes to a lower level tag (closer to the root) will imply
that all pictures in the hierarchy will be modified as well. e.g., If I rename
the tag "Ontario" to something else (e.g. "ONT"), all pictures containing
Toronto will be written to reflect those changes. In the XMP metadata browser,
which contains many different tag systems, changes will be reflected this way
(for simplicity sake, just lightroom):

  lr:     hierarchicalSubject = Canada|Ontario|Toronto

to 

  lr:     hierarchicalSubject = Canada|ONT|Toronto



This is when things work normally, but there is one situation when this is not
working properly, which is why I am reporting this bug.

Imagine you have pictures tagged either one of the following ways:

Case 1)                            Case 2)

    [X] Ontario        but also       [] Ontario
        [x] Toronto                       [x] Toronto

and you create a new root-level tag called  "Canada". Next, you drag and drop
"Ontario" over "Canada". All pictures in Case 1 will be written and updated
correctly:

from  lr:  hierarchicalSubject = Ontario|Toronto 
to    lr:  hierarchicalSubject = Canada|Ontario|Toronto

But pictures in Case 2 will NOT be updated. Their metadata will remain intact.
Although changes have been correctly applied in the database. Until you
manually select any of these pictures and use "Item, Write metadata to file"
option.

Basically, if there is a "gap" in the hierarchy where a parent tag is not
"checked", the metadata update will skip these files, which will not be updated
unless they are updated manually. So this is a situation where the database and
the metadata have become out of sync.

A symptom of this behavior can also be found in the warning when a large number
of files are going to be modified (since these kind of reorganizations also
imply hundreds or thousands of pictures). The number of affected pictures by
the warning will be fewer than the total number of pictures included in the
hierarchy. But this behavior can be easily reproduced in using just two
pictures.

As I said, manually selecting the affected (non-updated) files and forcing
writing meta-data to files updates them with the correct hierarchy once again.


SOFTWARE/OS VERSIONS

Linux: Digikam 6.4.0 (stable release) appimage in Ubuntu 18.04 LTS

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to