Ticket Rule- auto populate name field broke after update
We have a ticket rule where, upon save, the requester name field is auto populated and after we updated from 6.4 to 7.1 (or it might have been the 7.0 update since they were done so close together) it quit working. The update query no longer shows any errors and says executed but it always updates 0 rows even though it shows 1 row selected. Here is the update query and the last run log.
JOIN USER ON USER.ID = HD_TICKET.CUSTOM_FIELD_VALUE9
JOIN USER_FIELD_VALUE USER_CUSTOM_1 on USER.ID = USER_CUSTOM_1.USER_ID
and USER_CUSTOM_1.FIELD_ID = 1
HD_TICKET.CUSTOM_FIELD_VALUE9 = USER_CUSTOM_1.FIELD_VALUE,
HD_TICKET.SUBMITTER_ID = USER.ID
where (HD_TICKET.ID in (<TICKET_IDS>))
and HD_TICKET.CUSTOM_FIELD_VALUE9 is not null
and USER.ID = HD_TICKET.CUSTOM_FIELD_VALUE8
Last Run Log
06/29/2017 09:09:36> Starting: 06/29/2017 09:09:36 06/29/2017 09:09:36> Executing Select Query... 06/29/2017 09:09:36> selected 1 rows 06/29/2017 09:09:36> Executing Update Query... 06/29/2017 09:09:36> updated 0 rows 06/29/2017 09:09:36> Ending: 06/29/2017 09:09:36
Please log in to answer
Posted by: chucksteel 3 years ago
I'm not sure what you are trying to accomplish here. You join based on the value in HD_TICKET.CUSTOM_FIELD_VALUE9 but then you change that value. Later in the where statement you limit to tickets where USER.ID = HD_TICKET.CUSTOM_FIELD_VALUE8. Do both custom fields 8 and 9 contain the user id for the requestor?