Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,310
Community Members
 
Community Events
168
Community Groups

Automating 'Original Estimate' field based on custom field in another issue.

Using automation rules within Jira Cloud, I'm automating the creation of issues when the Epic is created and a related checkbox is ticked.  As an example, if I tick 'UX' as a requirement in the 'Resources Required' field, then when the Epic is created, it creates a 'UX' issue.

For the most part, I have it working as expected (including linking the new issue back to the Epic, setting the summary field to match the Summary of the Epic with a custom string appended to it, and making the assignee the same person that is set in a custom field from the Epic).  However, I have hit a stumbling block with the 'Original Estimate' field.

When I choose 'copy from', unlike other fields, my options are limited to 'Original Estimate', 'Remaining Estimate', and 'Time Spent' only - there is no option to select any other field type.

I've tried using the 'Set value' operation, but I can't get it to work.  I'm not sure if this is because my script is wrong, or there is a limitation set somewhere due to Tempo (which we're also using).

Please can anyone tell me if there is something wrong with the way I have structured the following script:

{{triggerissue.CustomField_11837.value}}Screenshot.PNG

Thanks,

1 answer

1 accepted

2 votes
Answer accepted
Eric Atlassian Team Jul 28, 2020

Hi @Rob Dunn ,

 

Can you share a bit more details about the field you want to copy into the Original Estimate field? (CustomField_11837) e.g. what custom field type is it? what does the field value look like? - you can look this up via https://<sitename>.atlassian.net/rest/api/2/issue/<issue-key>.

Hi Eric,

The custom field is using the field type 'Number Field'.  Our Jira instance is set to hours by default so my expected behaviour is that putting in a number is sufficient as it will automatically put 'h' on the end.

Rob

Eric Atlassian Team Jul 29, 2020

Hi @Rob Dunn 

 

If that's the case, setting the Original Estimate field to {{triggerissue.CustomField_11837}} should do the trick (drop the .value at the end).

Alternatively, you can also do {{triggerissue.CustomField_11837}}h to be explicit.

 

Eric

Thanks Eric, that cracked it. :)

Hi , I just tied this 

 

{ "fields": { "timetracking": { "originalEstimate": " {{triggerissue.CustomField_10066}}h"} } }

 

but it populates the field to 23h (if I set to 2.3). Any help?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events