Modify

#11226 closed defect (fixed)

Replacing a tag removes unrelated tags

Reported by: AllenB Owned by: hasienda
Priority: high Component: TagsPlugin
Severity: major Keywords:
Cc: Trac Release: 1.0

Description

I noticed that while using the tag administration UI to rename a tag, all of the other keywords were being lost from the affected tickets. The keywords in question were unrelated to the tag that was being renamed.

I am running version 0.7dev-r13304 of the TagsPlugin on Trac v1.0 (Python v2.7.3).

To Reproduce

  1. Create a ticket that has keywords: apple banana
  2. In the "Manage Tags" admin panel, select apple in the "Current Tag" list and enter Apple in the "New Tag" field. Click the "Change" button.
  3. View the ticket again. It will only have Apple listed in its keyword list.

I would expect that apple would be replaced with Apple, but all other keywords on the ticket would remain untouched.

It doesn't appear to make a difference whether the tag you are changing is first, last, or in the middle of the keyword list.

Attachments (0)

Change History (3)

comment:1 Changed 11 months ago by hasienda

  • Priority changed from normal to high

I want to track this down and fix it before the release of tags-0.7 with the new mass replace feature for tag admins (#9061).

comment:2 Changed 11 months ago by hasienda

In 13712:

TagsPlugin: Return all tags for matching tickets, refs #4503, #11226 and #11302.

When moving ticket tags to normalized storage in [13165], my adapted db query
did no longer retrieve all tags for matching tickets in ticket tag provider
method get_tagged_resources().

Using this method in TagSystem.replace_tag() consequently caused
reproducible loss of all ticket tags other than the new tag.
Corresponding unit test covers ticket with multiple tags now as well.

comment:3 Changed 10 months ago by hasienda

  • Resolution set to fixed
  • Status changed from new to closed

In 13816:

TagsPlugin: Add release tag for 0.7, pushing development to tractags-0.8dev.

Note, that [13815] forgot to mention, that the release closes #11226 too.

Add Comment

Modify Ticket

Action
as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.