Modify

Opened 3 years ago

Closed 4 days ago

#9072 closed defect (fixed)

When setting blocking/blocked, opposing field it is not set in corresponding ticket

Reported by: hlashbrooke Owned by: rjollos
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: mwisnicki@… Trac Release: 0.12

Description

If I set #1 to be blocked by #2, the Blocking field on #2 is not updated. A comment is added to #2 that says "Blocking 1 added", but the actual Blocking field itself is not updated. Any reason why this would not be happening properly?

  • Using v3.0 on Trac 0.12

Attachments (0)

Change History (10)

comment:1 Changed 3 years ago by hlashbrooke

I'm not sure if I need to supply any more information, but let me know if there's any crucial data I haven't given.

comment:2 Changed 3 years ago by anonymous

Same problem here with the same version of trac and plugin....

comment:3 Changed 2 years ago by rjollos

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

Issue seems to be resolved with the latest version of the plugin (3.0.2). Please reopen if you can reproduce the issue with that version, or a later version.

comment:4 Changed 15 months ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Happens again.

  • TracMasterTickets 3.0.5dev-r13319
  • Trac 1.0.1

I also have same problem with ticketref plugin.

comment:5 Changed 15 months ago by Marcin Wisnicki <mwisnicki@…>

  • Cc mwisnicki@… added; anonymous removed

comment:6 Changed 15 months ago by Marcin Wisnicki <mwisnicki@…>

It doesn't happen every time. In fact I can't reproduce it now.

comment:7 Changed 11 months ago by rjollos

  • Owner changed from coderanger to rjollos
  • Status changed from reopened to assigned

comment:8 Changed 4 months ago by anonymous

Same here:

  • TracMasterTickets 3.0.5dev-r13319
  • Trac 1.0.1

comment:9 Changed 5 weeks ago by anonymous

I came across the same issue with Trac 1.0.1 and TracMasterTickets 3.0.5. I tracked down the issue finding the following section of code to be at fault. By moving the lines of code the result for the sql update statement is properly checked and the new value is inserted if no rows were updated. The bug only occurs when a custom field has not been created in the database for the ticket that you are adding to a blocked or blocked by field in the ticket you are editing.

  • model.py

    diff -u model.py.orig model.py
    old new  
    106106                    cursor.execute('UPDATE ticket_custom SET value=%s WHERE ticket=%s AND name=%s',
    107107                                   (new_value, n, field))
    108108
    109                     # refresh the changetime to prevent concurrent edits
    110                     cursor.execute('UPDATE ticket SET changetime=%s WHERE id=%s', (when_ts, n))
    111 
    112109                    if not cursor.rowcount:
    113110                        cursor.execute('INSERT INTO ticket_custom (ticket, name, value) VALUES (%s, %s, %s)',
    114111                                       (n, field, new_value))
    115112
     113                    # refresh the changetime to prevent concurrent edits
     114                    cursor.execute('UPDATE ticket SET changetime=%s WHERE id=%s', (when_ts, n))
     115
     116
    116117        # cursor.execute('DELETE FROM mastertickets WHERE source=%s OR dest=%s', (self.tkt.id, self.tkt.id))
    117118        # data = []
    118119        # for tkt in self.blocking:

comment:10 Changed 4 days ago by rjollos

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

In 14323:

Untested patch for failure to update field in linked ticket. Fixes #9072.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
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.