Bug 447713

Summary: if you de-select a sub-tag it will deselect all parents, even if there is another sub-tag left which would need the parent tags.
Product: [Applications] digikam Reporter: Sergejs <sdx>
Component: Tags-KeywordsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 7.4.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.5.0

Description Sergejs 2021-12-30 22:57:19 UTC
SUMMARY
***
Current Tag Tree allows breaking of tag hierarchy even when "Toggle-Auto - Parents" is on. 
if digiKam breaks tag hierarchy, then a sub-tag can be assigned to an image without its parents. Then any software that reads metadata from file will create a duplicate of the same tag outside its normal hierarchical tree. If the sub-tag is not unique, breaking of hierarchy can lead to data loss as without the context of the parent tags the sub-tag alone may be hard to distinguish.
***


STEPS TO REPRODUCE
1.  You need any 2 tags (A & B) with a common parent (C) in the Tag Tree (right side panel "Metadata" => "Tags")
2.   "Toggle-Auto - Parents" must be on (this option is already a must to avoid corruption of tag hierarchy as used in Microsoft programs such as OneDrive or WLPG)
3.  Assign Tag "A".  ==> digiKam will also correctly activate Tag "C".
4.  Assign Tag "B". ==> now the tags "A", "B" and "C" are all correctly selected.
5.  De-select Tag "A".  ==>

OBSERVED RESULT
5.  digiKam automatically de-selects the common Tag "C" and therefore breaks tag-hierarchy for the Tag "B"

EXPECTED RESULT
5.  the common Tag "C" must remain selected because there still is Tag "B" which needs "A" as a parent.



SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
https://userbase.kde.org/Digikam/Tutorials/Setup_of_digiKam_for_Windows_compatibility#Step_1_-_Enforce_Tag_Hierarchy
Comment 1 Sergejs 2021-12-30 23:28:14 UTC
After some more investigation I noticed that I had a wrong concept for what "Toggle-Auto - Parents" does. In fact I do not see a need to use "Toggle-Auto - Parents", so this whole bug report is unnecessary.

Please ignore and delete this bug.