Modify

Opened 6 years ago

Closed 3 years ago

#9072 closed defect (fixed)

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

Reported by: Hugh Owned by: Ryan J Ollos
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 6 years ago by Hugh

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 6 years ago by anonymous

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

comment:3 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

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 4 years ago by anonymous

Resolution: fixed
Status: closedreopened

Happens again.

  • TracMasterTickets 3.0.5dev-r13319
  • Trac 1.0.1

I also have same problem with ticketref plugin.

comment:5 Changed 4 years ago by Marcin Wisnicki <mwisnicki@…>

Cc: mwisnicki@… added; anonymous removed

comment:6 Changed 4 years ago by Marcin Wisnicki <mwisnicki@…>

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

comment:7 Changed 4 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: reopenedassigned

comment:8 Changed 3 years ago by anonymous

Same here:

  • TracMasterTickets 3.0.5dev-r13319
  • Trac 1.0.1

comment:9 Changed 3 years 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 3 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 14323:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.