Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to add fields to comment in automation

Hi,

I am trying to add the value of a field to a comment when creating a new request. I just started fresh with a Service Management Project Template "HR Service Management". I am the only user right now and I have full administrative priviledges accordingly.

I created a new rule in automation which adds the comment to the issue without a problem.

Then I want in that comment the Value from the field "Start date". For that i used the help entry inside automation "How to access issue data in my comments".

I tried the following:

1 {{issue.fields.start date}} 2 {{issue.start date}} 3 {{issue.fields.start date.value}} 4 {{issue.start date.value}} 5 {{issue.fields."start date"}} 6 {{issue.customfield_10015}}

It is always empty. I tried the customfield because I found it when I read the field names by accessing https://<instancename>/rest/api/2/issue/<issuename>?expand=names

 

"Start date" is delivered with the HR Service Management Template. I did not create it myself. It's a default field. Why can't I access it? I also tried copying the field in the field due date. I can even select "Start date" from the drop down list to copy. But this doesnt't work either. Here I get the error message in the audit protocol:

More than one field with same name and type found: Start date (com.atlassian.jira.plugin.system.customfieldtypes:datepicker)

 

I don't understand what I am doing wrong and I couldn't find a proper documentation about how to access the fields and where I get the exact names I have to use.

 

Regards

Roland Amann

3 answers

1 accepted

0 votes
Answer accepted

Hi @roland_amann 

Smart value names are case-sensitive, so this one could be: {{issue.Start Date}}

When you want to learn the name of a specific smart value, you can try this method to compare the values in an issue which uses the fields:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

Best regards,

Bill

Hi @roland_amann I have just tried this out with {{issue.start date}} and it worked fine for me.

Please may you provide a screenshot of your automation rule, just to double check its configuration

I made a manual trigger with action "add value to audit-protocol" (translated from german. I don't know if it's called exactly like that in english) and tried it. Did not work.

 

1 {{issue.fields.start date}} 2 {{issue.start date}} 3 {{issue.fields.start date.value}} 4 {{issue.start date.value}} 5 {{issue.fields."start date"}} 6 {{issue.customfield_10015}} 7 {{issue.startdate}}

 

Details zur Aktion:

Protocol 1 2 3 4 5 6 7

Zugehörige Elemente:

Manueller Trigger

HP-12

 

 

28-04-2021 11-24-10.png

 

The comment is created in the task. But the date is empty.

 

28-04-2021 11-28-57.png

 

Edit: Just to make sure. I want the value of the following field. This is the default jira hr Employee onboarding request type form:

28-04-2021 11-48-54.png

 

Hi @Bill Sheboy

Thank you. I looked in the names again. But this time I did not look for the name of the variable, but searched for the expected value. This worked.

The correct field name in my case is {{issue.customfield_10054}}. Why this is a custom field in the default form and why I can select it in a dropdown box and it still doesn't is beyond me.

But this is a solution I can live with. Thanks.


Regards

Roland

Roland, I am glad to hear that worked for you. 

Between the UI/UX, REST API, and smart values, I often check the names with the technique I sent you when something doesn't seem to work as often it is a name mismatch.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you