Copy fields into Description

Joe Sapinoso June 30, 2020

Is it possible to copy the fields for an issue into a description?

In Jira, for a project with a particular issue type - When someone wants to create a new ticket -  I want information collected in separate fields (like a form that captures data) and aggregate it in the description field.

Reason for this is : I have the jira cloud slack app integration , but it only works with summary and description field.

1 answer

1 accepted

2 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2020

Hi Joe,

Yes, you can do that with Automation For Jira. Here's some information to get started:

There are two types of automation:

  • Global: In the Free version, you get 100 executions per product, per month
  • Project: In all versions, you get unlimited executions per month

Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation

You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).

For more on using Automation For Jira see these help pages.

Your rule will be based on a new Issue being created.

Then put in any conditions.

Then Edit Issue action.

For the Description value use:

{{issue.description}}

{{issue.first field}}

{{issue.second field}}

And so on. 

Joe Sapinoso August 3, 2020

Hi John. Thank you so much for your response here. 

My next issue is that although the automation logs so "Successful" automations, the custom fields I am trying to populate don't show up. The values are all blank.

Here is what I am putting in:
-------------------------------

(In editing the "Description Field"): 

Justification:
{{issue.customfield.customfield_24669.asJsonString}}

Fix Version:
{{issue.customfield.customfield_24670.asJsonString}}

Deploy Date:
{{issue.customfield.customfield_24665.asJsonString}}

Environment(s):
{{issue.customfield.customfield_24666.asJsonString}}

Pull Request:
{{issue.customfield.customfield_18900.asJsonString}}

Root Cause:
{{issue.customfield.customfield_24667.asJsonString}}

RCA:
{{issue.customfield.customfield_24668.asJsonString}}

[Optional] Components:
{{issue.fields.components}}

[Optional] Found in Version:
{{issue.customfield.customfield_22800.asJsonString}}

[Optional] Assignee:
{{issue.fields.assignee}}

[Optional] Responsible PM:
{{issue.customfield.customfield_24671.asJsonString}}

[Optional] Found by:
{{issue.customfield.customfield_24672.asJsonString}}

[Optional] SLA Deadline:
{{issue.customfield.customfield_24673.asJsonString}}

[Optional] Team:
{{issue.customfield.customfield_24674.asJsonString}}

Here is what shows up:
-------------------------

(In editing the "Description Field"): 

Justification:

Fix Version:

Deploy Date:

Environment(s):

Pull Request:

Root Cause:

RCA:

[Optional] Components:

 

[Optional] Found in Version:

 

[Optional] Assignee:

[Optional] Responsible PM:

[Optional] Found by:

[Optional] SLA Deadline:

[Optional] Team:

The reason why I am doing it this way is because some fields have multiple values, or are floating numbers. Am I putting in the syntax wrong? Thanks again!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2020

Why are you adding as a Json string? Why not just this:

Justification:
{{issue.customfield_24669}}

Like # people like this
Joe Sapinoso August 4, 2020

Thanks John! This resolved it for most of the properties I listed; however, in the case of custom fields that contain tagged Jira Users, I only am able to see their UUIDs. Is there a way I can show their names instead?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2020

Great! Glad that helped out. 

For the user fields try adding .displayName at the end. Like this:

{{issue.customfield_24669.displayName}}

Joe Sapinoso August 4, 2020

Thanks again John! I was able to make the change, but now the automation is not working again. The description field is completely empty now, but the Audit Logs do not show any errors. 

I rolled back the change, and now the Description field is still completely empty. Do you have any suggestions as to how I can troubleshoot this next thing? Again, I appreciate all the help!


John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2020

Can you post a screenshot of the latest rule that failed and the audit log?

Be sure the issue you are testing against has values in it 😊

Joe Sapinoso August 4, 2020

Scratch that John, it works!!! I had to wait the few seconds it took for the automation to complete. My mistake was accessing the ticket I created too soon. Thanks for all the help!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2020

Fantastic!!

Joe Sapinoso August 28, 2020

@John Funk , the field {{issue.fields.issuelinks}} doesn't show properly:2020-08-28 12_00_41-[IT-23311] Update ADCM-Hotfix jira fields - Atlassian JIRA and 10 more pages - W.png

I expect here to see the ticket name (ex. IT-49384), but instead am shown what is highlighted in the above screenshot. 

Is there a way around this?

Thank you as always! 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020
Joe Sapinoso August 28, 2020

We are getting closer. I made the suggested changes as mentioned in the post you linked; however the result is a URL as opposed to just the ticket name: 

2020-08-28 12_52_33-[IT-23311] Update ADCM-Hotfix jira fields - Atlassian JIRA and 6 more pages - Wo.png

Is there a further adjustment you can recommend? 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2020

What is the smart value you are using?

Joe Sapinoso August 28, 2020

2 actually: 


{{issue.issuelinks.inwardIssue}}
{{issue.issuelinks.outwardIssue}}
Kevin O'Shaughnessy November 26, 2021

Hi guys, 

Any idea on how to the automation to work on just one issue type??

Thanks

Kevin

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2021

You should be able to add a condition to check for just that one issue type. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events