When using JSON notation in automation rules, attempting to reference a particular parameter of a custom field is not pulling the value of that parameter into the intended location.
I'm trying to have the summary of an issue generated by an automation rule include one parameter from a custom field in the trigger issue. This particular custom field is an issue type, as in, the value of that custom field will be a link to an issue in a specific project. The editmeta for an issue using the custom field in question lists two promising parameters for the field: summary and summaryText. Using the following JSON, I do not receive an error, but the data in those parameters is not filling in the summary of the auto-generated ticket:
{
"fields": {
"summary": "New PDU - {{customfield_13106.summary.asJsonString}}",
"customfield_13106": "{{triggerIssue.customfield_13106}}",
"customfield_13709": "{{triggerIssue.customfield_13709}}"
}
}
The summary of the created issue will simply be "New PDU - ". I have tried adjusting the JSON to exclude asJsonString, used triggerissue.customfield_13106, and used both summary and summaryText (which both contain text values) in the bolded line above, but still no dice. Has anyone gotten this sort of thing to work or can suggest an alternative?
Are you using a plugin to get that custom field type? If so, can you please let us know what the add on is so that we can better help you come up with a solution?
Thanks!
Kian
Hi Kian, thank you for the quick reply. We are using the STAGIL Assets add on, seen here. The custom field is a STAGIL Assets Relation type.
It also may be worth noting that when using just {{triggerissue.customfield_13106}} in the summary assignment, it will pull the text of the issue key, i.e. New PDU - AM-106.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Matt S, I installed STAGIL to try and help resolve the issue. I'm afraid I don't have a ton of experience with the tool. It appears as though you tell it what issue should go in there based on the links in issue? If so, you should actually be able to look up the value directly from the issue link.
In the ticket data, the issue links are stored with their summaries attached. So in my case, I told Stagil to pull in issues which "relates to" my issue and then I got the summary this way:
{{issue.issuelinks.get(0).outwardIssue.fields.summary}}
I don't know how helpful this will be for you, but maybe it'll get you a little bit closer !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Matt S
I am with STAGIL, the vendor of this app.
Your approach does not work, because the custom field only returns the issue key of the related issue, no additional information, like the summary.
You can use the value of the custom field to look up the issue and then reference the issue's summary.
I don't know what your automation rule looks like, but there is also the possibility to create a variable (rule action). E.g. when searching for the issue key (rule branch), you could then use the actual issue's summary and copy it to the variable and use it. But that all depends on your use case and the rule itself.
If you want, you could create a ticket at https://support.stagil.com/ and we can have a look at your automation rule together and figure out a solution.
Cheers,
Dan
STAGIL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Daniel Fietta,
Thank you for reaching out. This variable action sounds like what I'd need, but I don't see it available. Are you aware if this is similar to the Set entity property action or if variable creation is part of a separate add on?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.