Hi Experts.
We Have JIRA Data center (no cloud). And working on integration to CALM.
But have a problem to sync JIRA Sprint to CALM Timebox.
I'm using automation to sync data. Everything working well excepts fields I've mentioned above.
Sync those two properties I've made this way :
- web request to get list of timeboxes from CALM (there is no API to get only one using the name property)
- get ID using name from response :
- create variable timeboxId using smart value
- but there is a problem
1. when I use fixed name it is working fine :
{{#webhookResponse.body}}{{#if(equals(name, "Sprint 1"))}}{{id}}{{/}}{{/}}
In timeboxId is GUID of the timebox from CALM
2. But when I'm using dynamic variable, it is not working :
{{#webhookResponse.body}}{{#if(equals(name, SprintName))}}{{id}}{{/}}{{/}}
SprintName is variable derived from issue.Sprint.name
In this case timeboxId variable is always empty.
Please, How should I use smart value and enter dynamic value (sprint name). I've tried a lot of expressions, but no one working well.
Or, how should I sync Sprint property in Task (JIRA) with Timebox property in CALM.
Thank You.
Hi @Michal Tvrdý ,
In Jira Data Center automation, variables are not resolved automatically inside string comparisons. That’s why the condition works with a hard-coded value but fails when using a variable.
When you use:
{{#if(equals(name, SprintName))}}
SprintName is treated as plain text, not as a resolved smart value, which results in an empty match.
To make this work, reference the smart value directly in the comparison, for example:
{{#webhookResponse.body}}
{{#if(equals(name, issue.Sprint.name))}}
{{id}}
{{/}}
{{/}}
Alternatively, if you are using a variable, it must be resolved explicitly:
{{#webhookResponse.body}}
{{#if(equals(name, "{{SprintName}}"))}}
{{id}}
{{/}}
{{/}}
Using the original smart value (issue.Sprint.name) is the recommended approach in Data Center, as it avoids variable-scope and resolution issues.
This behavior is expected and is a limitation of how Jira Data Center automation evaluates smart values in conditional expressions.
I've already checked those expressions. But the first one returns no value and the second end with error : String must be closed: "{{SprintName: {{#webhookResponse.body}}{{#if(equals(name, "{{SprintName}}"))}}{{id}}{{/}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a long-standing limitation / defect for long-format list iteration syntax:
Once inside a long-format list iterator, only data from that scope and lower can be accessed.
Thus, other smart values in the issue and created variables cannot be used inside. This problem exists in Jira Cloud, Server, and Data Center automation rules. Atlassian knows about this limitation and has tried several times to fix it...without success.
Without seeing your entire rule for context, there are two possible solutions:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've checked the link, but this is about lookup issues. However I need to lookup through response data ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That article link is about dynamically searching any list's data: lookup results, web response, issue object field (e.g., fix versions), etc. The solution pattern is the same for any list source:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but I still don't know how should I implement getting UUID from CALM stories using the lookup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You appear to be calling a REST API endpoint with the Send Web Request action to get the data. The list of items returned in the web response would fit with the step #1 described above, then continue the steps from there.
I recommend trying it with a test rule, perhaps which does not updating anything so it can be run repeatedly for testing.
If you have tried that and it does not work, please post the following for context:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no problem that this doesn't work. But I don't know how should I do it.
Step 1 - Ok, clear, I've already created web request to get data
Step 2 - OK, store the data in variable using "create variable".
Step 3 - Sorry, but I don't know how should I do it? Which action I should use ? I need an example how to do it. Because from help in JIRA I'm not too wise :-)
Step 4 - the same as step 3.
Finally, I need to use UUID of timebox in following WEB request (creating TASK in CALM)
BODY :
{
"projectId": "1870d641-2a41-4d35-a4b4-f806b4c37dd0",
"title": "[JIRA ISSUE - {{issue.issuetype.name}}] - {{issue.summary}}",
"type": "CALMTASK",
"externalId":"{{issue.key}}",
"priorityId": "{{PriorityCALMID}}",
"description": "{{issue.description.replace("\r\n","<br>").replace("\n","<br>").replace("\"","\\\"")}}",
"startDate": "{{issue.fields.customfield_11512}}",
"dueDate": "{{issue.fields.customfield_11513}}",
"storyPoints": 3,
"effort": 5,
"timeboxId": "{{timeboxId}}",
"assigneeId":"{{issue.fields.assignee.emailAddress}}"
}
But the {{timeboxId}} is always empty ... and neet to know how should I fill this property ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, and let's align on some context...please post:
Seeing those may help explain what you are observing. Thanks!
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.