I have create a validation script in one transition.
I added a customfield update in the validation, so is something like this
if validation == true
{ MutableIssue mi = (MutableIssue) issue; mi.setCustomFieldValue(CampoAPPT, "En Progreso"); ComponentAccessor.getIssueManager().updateIssue(currentUser, mi, EventDispatchOption.ISSUE_UPDATED, false); return true }
else
{ MutableIssue mi = (MutableIssue) issue; mi.setCustomFieldValue(CampoAPPT, "No Agendado"); ComponentAccessor.getIssueManager().updateIssue(currentUser, mi, EventDispatchOption.ISSUE_UPDATED, false); return false }
If i execute this in the console, i get the customfield updated in both cases. But if i do the transition, false validation doesn't update the field