Edgewall Software

Opened 2 years ago

Last modified 10 months ago

#10681 new defect

commit_updater.py create wrong comment number

Reported by: haterw@… Owned by:
Priority: normal Milestone: undecided
Component: ticket system Version: 0.12.2
Severity: normal Keywords:
Release Notes:
API Changes:


How to reproduce

  1. create new ticket A,B
  2. add a comment in ticket B
  3. commit message like below TWICE in hg
    refs #B
    refs #A
    test commit updater

Expect result
Ticket A will have comment 1,2
Ticket B will have comment 1,2,3

In fact we get
Ticket A has comment 1,2
Ticket B has comment number 1,2,2

Attachments (0)

Change History (4)

comment:1 Changed 20 months ago by cboos

  • Milestone set to undecided

All the tickets for {20} from last year have probably been seen multiple times by now, yet are still to be triaged…

comment:2 Changed 10 months ago by marthein1@…

I have observed the same problem on our local trac site used for SVN. Additionally, I observed that when 3 tickets are referenced in a commit comment, the comment number on the first ticket is correct, the one in the second ticket is equal to the previous number, and the one in the third ticket is one less than the previous number.

After observing commit_updater.py, I think the problem is in ticket.save_changes() and is the problem reported in #10465.

comment:3 Changed 10 months ago by marthein1@…

I forgot to mention we use trac 0.12.

comment:4 Changed 10 months ago by rblank

Could you be more explicit about what is wrong in save_changes()? commit_updater.py uses separate Ticket instances for the various tickets it updates, so it's not obvious why the comment number would somehow persist across instances.

Add Comment

Modify Ticket

Change Properties
<Author field>
as new The ticket will remain with no owner.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

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

Note: See TracTickets for help on using tickets.