Changes between Initial Version and Version 1 of Ticket #11253
- Timestamp:
- Jan 8, 2014, 6:06:49 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11253
-
Property
Status
changed from
new
toaccepted
-
Property
Status
changed from
-
Ticket #11253 – Description
initial v1 1 from model.py:1 from `model.py`: 2 2 3 {{{ 3 {{{#!py 4 4 cursor.execute('UPDATE ticket_custom SET value=%s WHERE ticket=%s AND name=%s', 5 5 (new_value, n, field)) … … 12 12 }}} 13 13 14 Since there is "UPDATE ticket" between "UPDATE ticket_custom" and "if not cursor.rowcount", "INSERT INTO ticket_custom" is actually never called, because "UPDATE ticket" is always OK, no matter if "UPDATE ticket_custom"completed successfully or there is no such record.14 Since there is `UPDATE ticket" between "UPDATE ticket_custom` and `if not cursor.rowcount`, `INSERT INTO ticket_custom` is actually never called, because `UPDATE ticket` is always OK, no matter if `UPDATE ticket_custom` completed successfully or there is no such record. 15 15 16 Got this issue on a legacy database where tickets do not have corresponding ticket_custom values for blockedby and blocked.16 Got this issue on a legacy database where tickets do not have corresponding ticket_custom values for `blockedby` and `blocked`. 17 17 18 I did a patch for this issue, you just have to move "UPDATE ticket" below "if not cursor.rowcount - INSERT INTO ticket custom"block.18 I did a patch for this issue, you just have to move `UPDATE ticket` below `if not cursor.rowcount - INSERT INTO ticket custom` block.