Hi Community!
I need predifiend comment for the JSM agents to use. Several solutions already exists: out of the box canned responses, canned responses pro (Appfire), comment templates (part of scriptrunner)
I also need to use custom fields in the comments which is not possile with the default canned responses.
Here is the difficlult part: when the agent changes the value of a custom field on a transition screen the comment template should use that new value and not the value that is currently saved on the issue.
It does not seem possible with Appfire's solution (confirmed by vendor).
In the example below I want the new value of unavailability type in the comment.

I know the value is not stored in the issue until the transition has been executed. But is their a way to access the transition field values with the groovy code?
This scriptrunner code gets the current value on the issue (not the transition screen value)
def cfUnavailability = customFieldManager.getCustomFieldObjectsByName("Unavailability Type")[0]
config.unavailabilityType = issue.getCustomFieldValue(cfUnavailability)
return true
${config.unavailabilityType}
Any ideas?