Opened 13 years ago
Closed 10 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 |
Attachments (0)
Change History (10)
comment:1 Changed 13 years ago by
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → 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 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Happens again.
- TracMasterTickets 3.0.5dev-r13319
- Trac 1.0.1
I also have same problem with ticketref plugin.
comment:5 Changed 11 years ago by
Cc: | mwisnicki@… added; anonymous removed |
---|
comment:7 Changed 11 years ago by
Owner: | changed from Noah Kantrowitz to Ryan J Ollos |
---|---|
Status: | reopened → assigned |
comment:9 Changed 10 years ago by
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 106 106 cursor.execute('UPDATE ticket_custom SET value=%s WHERE ticket=%s AND name=%s', 107 107 (new_value, n, field)) 108 108 109 # refresh the changetime to prevent concurrent edits110 cursor.execute('UPDATE ticket SET changetime=%s WHERE id=%s', (when_ts, n))111 112 109 if not cursor.rowcount: 113 110 cursor.execute('INSERT INTO ticket_custom (ticket, name, value) VALUES (%s, %s, %s)', 114 111 (n, field, new_value)) 115 112 113 # refresh the changetime to prevent concurrent edits 114 cursor.execute('UPDATE ticket SET changetime=%s WHERE id=%s', (when_ts, n)) 115 116 116 117 # cursor.execute('DELETE FROM mastertickets WHERE source=%s OR dest=%s', (self.tkt.id, self.tkt.id)) 117 118 # data = [] 118 119 # for tkt in self.blocking:
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.