Set JIRA Agile Estimate on issue creation?

Paul Stallworth
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2015

I'm wondering if it is possible to set the Agile Estimate on issue creation.  Our Web Team uses t-shirt sizes but JIRA Agile needs numeric values for calculations, so my thought was to do the conversion in Groovy.  

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2015

That's exactly what I'd do - write a post-function script that does a simple "case (t-shirt size), set estimate appropriately"  (I'd leave the estimate off the create screen so the users do not enter it initially only to have it overwritten by the post-function)

Paul Stallworth
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2015

Thanks for the quick response Nic.  I am brand new to scripting in JIRA so I'm not entirely confident on where the Estimate lives.  Is it the same as greenhopper.jira.fields.OriginalEstimate?

Also, the user enters in the t-shirt size into a customer Story Points fields, so my plan is to read that value and then set the Estimate appropriately.  I feel confident that I'll find my custom field in com.atlassian.jira.issue.customfields

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2015

To set the estimate, I'd just use issue.setOriginalEstimate(x) (I can't remember what X's units are - seconds or milliseconds) To get the Story points field (it's still a custom field, even though Agile does clever stuff with it), I'd use the code from Jamie's docs (just to save you working it out from scratch) - https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions+With+Comments#PostFunctionsWithComments-Copyonefieldtoanotherusingregexp

Paul Stallworth
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 12, 2015

Great. Thanks so much for your help!

Suggest an answer

Log in or Sign up to answer