2
1
0
- Pahan
- Sep 01, 2020
setting up a rule to match non-related field in jira to particular issue types
If we have an issue type called Environment in the source JIRA and we wan to add a rule as
if 'Environment ' is having values "X", "Y", "Z"
then replica JIRA issue type should be set to 'Non-Prod issue'
if 'Environment ' is having values "P"
then replica JIRA issue type should be set to 'Prod issue'
Thanks in advance
Source: Jira Cloud
- connector-cloud-jira
- Comment
CommentAdd your comment...
1 answer
- 10-1
Hi Pahan,
Thanks for raising this question!
On the Jira that will be sending the Environment field, Outgoing filter:
replica.customFields."Environment" = issue.customFields."Environment"
Incoming filter in the receiving Jira:
def environmentMapping = ["X":"Non-Prod issue", "Y":"Non-Prod issue", "Z":"Non-Prod issue", "P":"Prod issue"] def environmentValue = replica.customFields."Environment"?.value if (firstSync) { issue.projectKey = "TEST" issue.typeName = nodeHelper.getIssueType(environmentMapping[environmentValue])?.name ?: "Non-Prod issue" }
This should work for the case you are describing
Thanks,
André
CommentAdd your comment...
Overview
Content Tools
search
attachments
weblink
advanced