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

Daniel Vrátil <dvra...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |16.08.1
      Latest Commit|                            |http://commits.kde.org/inci
                   |                            |denceeditor/c32d82e481568e4
                   |                            |1d11e5426005b6c9634f2e9b8
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Daniel Vrátil <dvra...@kde.org> ---
Git commit c32d82e481568e41d11e5426005b6c9634f2e9b8 by Daniel Vrátil, on behalf
of Denis Kurz.
Committed on 26/08/2016 at 13:26.
Pushed by dvratil into branch 'Applications/16.08'.

Set initial categories for non-cached incidences correctly

The old implementation tried to match loaded and existing tags on the
akonadi server side. A new CreateTag job was sent to the server, with
the name of the new tag and the hint to first check if this tag already
exists. The server, however, does not know about any tag names, and
tried to match the new tag by global id, which is completely random in
the TagCreate job.

Now, the matching is done on the client side, where the concept of tag
names is located. We fetch all tags from the server and check if the
categories of the loaded category match the names of these tags. For
every category that was not found in the tag list returned from the
server, we send a TagCreate job.

As a side benefit, we now also keep track of tags that failed to be
created on the server. We now report all tags that were selected,
as well as all categories that were set when the editor was opened
and for which no corresponding tag could be created. This reduces
the risk of losing categories.

Test Plan:
Opening the incidenceeditor from korganizer's eventviews for variuos
cached and non-cached items did not produce a single tag duplicate.
Also, the TagWidget's content is set correctly after the incidenceeditor
is created. Without the patch, everything reported in Bug 352645
happened here, too.
Related: bug 352645
FIXED-IN: 16.08.1

Differential Revision: https://phabricator.kde.org/D2423

M  +63   -11   src/incidencecategories.cpp
M  +16   -9    src/incidencecategories.h

http://commits.kde.org/incidenceeditor/c32d82e481568e41d11e5426005b6c9634f2e9b8

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

Reply via email to