<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>159158</bug_id>
          
          <creation_ts>2008-03-11 21:38:13 +0000</creation_ts>
          <short_desc>Tags moved in tree are duplicated in the IPTC metadata</short_desc>
          <delta_ts>2017-08-13 07:31:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Metadata-Iptc</component>
          <version>0.9.2</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jean-Marc Liotier">jm</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>kdebugsystem</cc>
    
    <cc>marcel.wiesweg</cc>
    
    <cc>monoceros84</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin>1.0.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>2</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>586259</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Marc Liotier">jm</who>
    <bug_when>2008-03-11 21:38:13 +0000</bug_when>
    <thetext>Version:           0.9.2-final (using KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

Let&apos;s take a file an tag it with the word &quot;Senegal&quot;, then synchronize the images from the database.

21:12 jim@senecio ~/digikam_albums/Senegal2008% exiv2 -p iptc img_1640.jpg
Iptc.Application2.Program                    String      7  digiKam
Iptc.Application2.ProgramVersion             String     11  0.9.2-final
Iptc.Application2.Keywords                   String      8  Senegal

Wait - surely I&apos;m going to visit other countries, so let&apos;s make a &quot;Place&quot; category and put &quot;Senegal&quot; in it by drag and dropping it there in the &quot;Tag Filters&quot; tree display on the right of the main window. 

21:13 jim@senecio ~/digikam_albums/Senegal2008% exiv2 -p iptc img_1640.jpg
Iptc.Application2.Program                    String      7  digiKam
Iptc.Application2.ProgramVersion             String     11  0.9.2-final
Iptc.Application2.Keywords                   String      8  Senegal
Iptc.Application2.Keywords                   String     14  Place/Senegal

Ooops. &quot;Place/Senegal&quot; is correct, but &quot;Senegal&quot; has not been deleted.

Maybe this is consistent with Digikam&apos;s policy of not harming existing data inside the picture file. But from my point of view this is not what I expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>586260</commentid>
    <comment_count>1</comment_count>
    <who name="Jean-Marc Liotier">jm</who>
    <bug_when>2008-03-11 21:39:34 +0000</bug_when>
    <thetext>May be somehow related with bug 15873 (http://bugs.kde.org/show_bug.cgi?id=158713) and bug 136254 (http://bugs.kde.org/show_bug.cgi?id=136254).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>586266</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Marc Liotier">jm</who>
    <bug_when>2008-03-11 21:59:13 +0000</bug_when>
    <thetext>By the way, if you are hit by this bug, here is the workaround :
- &apos;exiv2 rm -d i yourfile.jpg&apos; or &apos;exiv2 rm -d i *.jpg&apos; will erase IPTC metadata.
- then hit &quot;Synchronize images with the database&quot; and your files shall soon be populated by the right tags fresh from the the database and with no trace of the moved or erased tags.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>597691</commentid>
    <comment_count>3</comment_count>
    <who name="Andi Clemens">andi.clemens</who>
    <bug_when>2008-04-29 10:58:38 +0000</bug_when>
    <thetext>I can confirm this bug. I have to remove the IPTC metadata first and synchronize the images with the database, otherwise old tags are still in the metadata or moved tags are duplicated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>604463</commentid>
    <comment_count>4</comment_count>
    <who name="">x3ri7yz02</who>
    <bug_when>2008-05-27 04:39:48 +0000</bug_when>
    <thetext>Confirmed in SVN (revisions:  exiv2 1463, graphics 813168, libs 813167)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>604544</commentid>
    <comment_count>5</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2008-05-27 12:14:07 +0000</bug_when>
    <thetext>Marcel,

I suspect a bug in MetadataHub. 

Same in http://bugs.kde.org/show_bug.cgi?id=152199

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>608327</commentid>
    <comment_count>6</comment_count>
    <who name="Marcel Wiesweg">marcel.wiesweg</who>
    <bug_when>2008-06-06 23:53:57 +0000</bug_when>
    <thetext>This is due to digikam&apos;s behavior: Existing tags from Metadata are kept.

There are two possible solutions to this problem:
1) When the tag is changed, the metadata of all images with this tag would need to be resynchronized automatically, actually only those files where the tag has been written to the metadata.
2) Digikam would need to know that Places/Senegal was formerly Senegal. This boils down to keep a map of tag movement history.

You see that both solution have significant side effects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>608386</commentid>
    <comment_count>7</comment_count>
    <who name="">x3ri7yz02</who>
    <bug_when>2008-06-07 09:15:20 +0000</bug_when>
    <thetext>Hi Marcel,

I think that (2) is unnecessarily complicated.  But the approach in (1) seems to be what a user would anticipate and expect:  moving a tag around inside the tag tree should update images which include that tag.

Is there a case where this behaviour would be incorrect?

PS.  Could a general function to update relevant images after changes to the tag tree also help solve bugs like #152199?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610552</commentid>
    <comment_count>8</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2008-06-12 18:34:14 +0000</bug_when>
    <thetext>To Marcel #6,

I vote for 1). It&apos;s more simple.

To x3ri7yz02 #7,

Try Tools/Update Metadata Database menu entry

Gilles Caulier
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610811</commentid>
    <comment_count>9</comment_count>
    <who name="Geoff King">gsking1</who>
    <bug_when>2008-06-13 14:39:15 +0000</bug_when>
    <thetext>Considering #2 - What about iptc fields that Digikam doesn&apos;t use? They could become unnecessarily deleted if you remove all iptc.  In my case last year I had some old tags in &quot;supplemental categories&quot; and some other iptc fields that would not have been repopulated using this method.  This might be useful:
exiv2 -v -M&quot;del Iptc.Application2.Keywords&quot; [filename]

Also for anyone interested Arnd and I both wrote scripts to scan directories and remove tags using this method last December.  They should be available on the mailing list. One example: http://mail.kde.org/pipermail/digikam-users/2007-December/004507.html

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>648092</commentid>
    <comment_count>10</comment_count>
    <who name="Mathias Lindner">monoceros84</who>
    <bug_when>2008-09-22 16:47:17 +0000</bug_when>
    <thetext>Don&apos;t forget the action of renaming a tag. Should behave the same way than moving a tag in the tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>776492</commentid>
    <comment_count>11</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2009-06-16 10:44:04 +0000</bug_when>
    <thetext>SVN commit 982571 by cgilles:

This is a long standing bug about Tag synchronization to XMP and IPTC keywords.
To wrap around this problem, we remove all previous keywords before to apply new sets.
Marcel, i think MetadataHub is right : new and old tags lists are fine. Problem must be in libkexiv2.
Anyway this patch fix the problem for the moment.
BUGS: 175321
BUGS: 159158
BUGS: 141912
BUGS: 186308
CCMAIL: marcel.wiesweg@gmx.de


 M  +7 -4      metadatahub.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&amp;revision=982571</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>