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
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 @[deleted]
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This does not work for me, can you share your exact syntax as it appears in your comment please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put this in the field:
@Safety Roland Amann: Sicherheitsausrüstung benötigt ab {{issue.customfield_10054}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
Protocol 1 2 3 4 5 6 7
HP-12
The comment is created in the task. But the date is empty.
Edit: Just to make sure. I want the value of the following field. This is the default jira hr Employee onboarding request type form:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.