Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy issue key to custom field with automation

David
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2022

We are wanting to use Confluence to post our roadmap to our customers using the jira macro. The issue is the jira macro displays links that I don't want exposed because our customers do not have access.

A separate post suggested creating custom fields for key and summary and displaying these instead. I am giving this a try, but I'm struggling to setup an automation rule. I don't want this to be a manual copy for every ticket. I am trying to copy the issue key and summary to custom fields when the ticket is created.

Does anyone know if this is possible, or have a suggestion on how to accomplish this?

Thanks

2 answers

2 accepted

2 votes
Answer accepted
David
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2022

I figured out that you can use Jira Smart Values to set the value of a customer field. In my case, I used {{issue.key}} and {{issue.summary}} to edit my custom fields as part of an automation rule.

0 votes
Answer accepted
David
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2022

In case anyone finds this post while asking the same question I originally had, I realized that if I copy the issue key to a custom field, Confluence will still display it as a link. It will work as needed (no link) if I only put in the number (what follows after the project abbreviation and dash) but I have not found a way to do that just yet.

I really don't want to have to key in the issue key number for every ticket. Does anyone know if it's possible to copy just the number of the ticket?

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2022

Hi @David 

You may try the text functions to split out the just the number part of the {{issue.key}} if that is what you want: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

For example: {{issue.key.substringAfter("-")}} for just the number or replace the hyphen with a space to break the conversion to a URL with {{issue.key.replace("-", " ")}}

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer