The main context of this ask, is the lack of Data/Time fields in Jira for when an SLA is met within Service Management. We require knowledge of the date/time for reporting.
So we created 2 date/time fields for SLAs: TTR (time to resolution) and TFR (time to first response) and we give them {{now}} in 2 sets of automation for when the SLA is satisfied.
Note there is no trigger for SLA satisfied, only for SLA breach. So we have to mirror the actions:
1. For SLA TTR is met - trigger when resolution is entered and issue transitioned to Resolved is fairly easy to set {{now}} to the TTR custom field.
2. For SLA TFR is met - the trigger is on comment made as the SLA is met with the assignee first responds to the customer. This is the harder one:
We need the right smartvalue for within a Branch on 'current issue.'
Branch on current issue fires for the issue tripping the automation when and issue comment is made.
We then branch "For Current Issue" (e.g., the one where the comment was just made)
Within the branch I want to make sure of 4 facts before applying an edit to the issue:
1. The customer request type is one where we have SLAs
2. The TFR met date/time field is empty (we don't want to overwrite with each comment)
3. The comment author is the assignee
4. The comment not internal
Results:
Condition 1: Easy as a field comparison on customer request type.
Condition 2: Fail: We have tried to use JQL in the branch with {{triggerissue.customfield_123456}} is EMPTY --> gives error "(key in ([jiraproject-key#]) AND (is EMPTY)). Expecting a field name but got 'is'. You must surround 'is' in quotation marks to use it as a field name.
So clearly the problem is not 'is' but the smartvalue is not resolving so is null.
That is where we are stuck.
Note: Server/Data Center in our own cloud, not Atlassian's.