xl8bot
1
Originally asked by Mikael Bohlin on 07 May 2020 (original question)
Hi,
is it possible to test on a value on a custom field in JIRA Cloud?
If i have a custom field and want to test on value and skip sync if it has a value = No
if (issue.customFields.“To TSC”.value == “No”) return;
Regards
Mikael
xl8bot
2
Answer by Mikael Bohlin on 08 May 2020
Hi Roman,
the intial condition does not work. The script is run every time, despite the vlalue of the field.
Regards
Mikael
Comments:
Roman commented on 08 May 2020
Mikael Bohlin
Can you please create a support ticket and attach your support.zip?
xl8bot
3
Answer by Roman on 07 May 2020
Hey Mikael Bohlin,
Yes. If you have in your Outgoing Sync
if (issue.customFields."To TSC".value == "No")
{
return;
}
else
{
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project
}
it will not send any data if the custom field value is No. Is this what you are trying to achieve?