<table><tr><td style="">dkurz created this revision.<br />Restricted Application added a project: KDE PIM.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7548" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The old code relied on the display name of the tags of the item provided<br />
via load(const Akonadi::Item&) being set, but those aren't actually<br />
fetched. This led IncidenceCategories to believe that an item's<br />
categories are the gids of its tags. Saving the item without confirming<br />
the category dialog (e.g. by only modifying the description) led to this<br />
gid being written back to Akonadi. Opening the item again afterwards<br />
then even leads to a corresponding Akonadi tag being created.</p>

<p>We reduce state in IncidenceEditor, stop matching Tags twice a<br />
row (in onTagsFetched and matchExistingCategories), and rely more on<br />
incidence->categories(), where no gid confusion exists.</p>

<p>BUG: 373257<br />
FIXED-IN: 5.6.1</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I editted multiple events in KOrganizer, modifying categories or<br />
description or title of the event, or all of them in one change.<br />
For categories, I tried to set related subsets of my tags (a sub-<br />
or superset of the previously selected tags), or completely unrelated<br />
sets (deselecting all selected, and selecting previously other ones<br />
instead). All changes were saved as expected, and no gid-named<br />
categories were created in the process.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R78 PIM: Incidence Editor</div></div></div><br /><div><strong>BRANCH</strong><div><div>hotfix-no-gid-categories</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7548" rel="noreferrer">https://phabricator.kde.org/D7548</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/incidencecategories.cpp<br />
src/incidencecategories.h</div></div></div><br /><div><strong>To: </strong>dkurz, KDE PIM<br /><strong>Cc: </strong>dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>