How do I add custom fields to issue summaries?
Asked by Justin Goodemoot:

Hello! I am trying to add what is input into a custom field (Name of Employee) by a user when submitting a ticket into the issue summary of the ticket.

I've found the custom field ID, and have tried automation by including {{issue.customfield_12524}} in the summary based on request type. I've also tried {{issue.Name of Employee}} and a couple of other options based on articles I've found.

However, once submitted, the result is just a string of numbers, (ex. 5e82917b9e34c00c17d20444), not the actual content of the custom field.

What am I doing wrong? Should I pre-populate the summary field in the request type with something specific to produce the desired return? Am I using the wrong code structure in the automation?

Please help!

Thanks,

Justin


Answers:
author: Kalyan Sattaluri
body: Hello [@Justin Goodemoot](/t5/user/viewprofilepage/user-id/5266444)

Is your custom field a user picker field?

Try to log below smart value before editing summary.

{{issue.customfield_12524.displayName}}

If that does not work, you may have to follow below steps and share relevant section of JSON for us to understand this field.

* Log into Jira
* Open new tab in browser
* enter below URL, replace bolded with your domain and sample issue key and hit enter
* https://**yourdomain** .net/rest/api/2/issue/**ABCD-60**?expand=names
* search for this custom field and share snippet of the JSON.

comments: author: Justin Goodemoot
body: Thank you Kalyan! It was a user picker field but I changed it to a short text field. I realized that this will be better for us long term as it will give users more flexibility, but I appreciate this potential solution should we go back to it being a user picker field.


author: Justin Goodemoot
body: Hi Kalyan, just popping back in to say that I tried the {{issue.customfield_12524.displayName}} on the user picker field as well, and that worked too! Thank you!


author: Niraj Kumar
body: Here are a few steps you can take to troubleshoot and resolve this issue:

* **Check the Automation Rule** : Ensure that the automation rule is correctly set up to pull the value from the custom field. The syntax `{{issue.customfield_12524}}` should work, but it's important to make sure that there are no typos or errors in the rule itself.
* **Verify Field Configuration**: Double-check that the custom field (Name of Employee) is correctly configured to accept and store the input data.
* **Review Field Context**: Custom fields in Jira can have different contexts for different issue types or projects. Make sure that the field context is appropriate for the issues you're working with.
* **Test with Static Data**: Try pre-populating the summary field with static text to see if the automation rule works with simple text. If this is successful, it indicates that the issue lies with the custom field value retrieval.

comments: author: Justin Goodemoot
body: Thank you so much Niraj!!

The Name of Employee field was a "user picker" custom field. I changed it to a new, short text input field, used the syntax {{issue.customfield.12682}} and it worked!

Thank you for your help!


author: Niraj Kumar
body: Glad to help Justin!


Tags: cloud

jira-service-management

jira-service-management-cloud