Modify

Opened 11 years ago

Closed 10 years ago

#11226 closed defect (fixed)

Replacing a tag removes unrelated tags

Reported by: Ben Allen Owned by: Steffen Hoffmann
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 10 years ago by Steffen Hoffmann

Priority: normalhigh

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 10 years ago by Steffen Hoffmann

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 years ago by Steffen Hoffmann

Resolution: fixed
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.