Hello,
We need to make an automation for testing link field in jira issues. The testing link is a combination from the bitbucket branch name and some other things.
For example link: RWP-343.RA.EXAMPLE.COM
RWP-343 will be the branch name and the rest will be static text.
The backend from the link will be deployed with pipelines.
Is there a way when the pipeline is run to populate the custom field in Jira issue with that link with the branch name from bitbucket ?
There might be some way, depending on what pipelines/logic you are wanting to trigger on, to do this using a DevOps trigger. However, there definitely is a way using the Incoming Webhook trigger
Assuming the issue key in question for the example is RWP-343, and you are wanting to populate your customfield_X with the link RWP-343.RA.EXAMPLE.COM
You can configure a rule to have an webhook trigger set to "Issues provided in the webhook HTTP POST body". Then, you can include an Edit Issue action, where you set your customfield_X to the smart value of
{{webhookData.link}}
Now all you need to do in the pipelines is call the webhook url defined in the trigger, along with the POST payload of
{"issues":["RWP-343"], "data": {"link":"RWP-343.RA.EXAMPLE.COM"}}
and it will populate that issue's custom field. Substitute the issue/branch key here with the branch name variable in your pipelines to get it to work generically.
Hope that helps
Cheers
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.