Hi everybody!
I have a custom field value (select list with text field) that have different choice about the Complexity of the issues.
EX: Complexity: Medium (1 - 2 - 3)
I need to set the Original Estimate (timeoriginalestimate in jiradb) based on the option select in Complexity.
EX: if Complexity is "Medium" than I want to set 6d on the Original Estimate.
Is there a simple way to do this?
.............................................
I found a wonderful plugin (Script Runner) that have a function like "Copy Custom Field Value" that copy the value from one customfield to another customfield...
Like I have write before, I want to do something similar, but:
- not making a copy (because the select list is a text, and the Original estimate is a value)
- working with the Original Esimate (not a customfield)
I have a parameter table that associate Complexity - TIME
Best best best regards,
Marco
Community moderators have prevented the ability to post new answers.
I was having some problems with originalEstimate as well and found that I first needed to set the estimate on the issue, and then store it. The following works in Script Runner.
issue.setOriginalEstimate(0L)
issue.store()
Hopefully this helps.
Hi,
yes it's exactly what I need.
But I have a problem, when I try to set up for example the 'Description' depending on 'complexity' it works fine, instead when I try to set the Original Estimatesit's not working.
This is the code:
import com.onresolve.jira.groovy.user.FieldBehaviours import com.atlassian.jira.issue.fields.CustomField FormField formComplexity = getFieldById("customfield_10000") FormField formOE = getFieldByName("Original Estimate") String Compl_Value = (String) formComplexity.getFormValue() if ( formComplexity.getValue()==("05. Very Very Easy") ) { formOE.setFormValue("1d") } else if ( formComplexity.getValue()==("10. Very Easy ( 0.5a | 2d | 1.5t )") ) { formOE.setFormValue("4d") } else if ( formComplexity.getValue()==("20. Easy ( 1a | 4d | 2t )") ) { formOE.setFormValue("7d") } else if ( formComplexity.getValue()==("30. Easy/Medium ( 2a | 8d | 2t )") ) { formOE.setFormValue("12d") } else if ( formComplexity.getValue()==("40. Medium ( 2a | 15d | 3t )") ) { formOE.setFormValue("20d") } else if ( formComplexity.getValue()==("50. Medium/Complex ( 4a | 20d | 4t )") ) { formOE.setFormValue("28d") } else if ( formComplexity.getValue()==("60. Complex ( 5a | 30d | 5t )") ) {formOE.setFormValue("40d") } else if ( formComplexity.getValue()==("70. Very Complex") ) { formOE.setFormValue("60d") } else { formOE.setFormValue("0h") }
It seems that ìs not recognizing the field Original estimates. Can someone help me?
Thanks,
S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes it's exactly what I need.
But I have a problem, when I try to set up for example the 'Description' depending on 'complexity' it works fine, instead when I try to set the Original Estimatesit's not working.
This is the code:
import com.onresolve.jira.groovy.user.FieldBehaviours import com.atlassian.jira.issue.fields.CustomField FormField formComplexity = getFieldById("customfield_10000") FormField formOE = getFieldByName("Original Estimate") String Compl_Value = (String) formComplexity.getFormValue() if ( formComplexity.getValue()==("05. Very Very Easy") ) { formOE.setFormValue("1d") } else if ( formComplexity.getValue()==("10. Very Easy ( 0.5a | 2d | 1.5t )") ) { formOE.setFormValue("4d") } else if ( formComplexity.getValue()==("20. Easy ( 1a | 4d | 2t )") ) { formOE.setFormValue("7d") } else if ( formComplexity.getValue()==("30. Easy/Medium ( 2a | 8d | 2t )") ) { formOE.setFormValue("12d") } else if ( formComplexity.getValue()==("40. Medium ( 2a | 15d | 3t )") ) { formOE.setFormValue("20d") } else if ( formComplexity.getValue()==("50. Medium/Complex ( 4a | 20d | 4t )") ) { formOE.setFormValue("28d") } else if ( formComplexity.getValue()==("60. Complex ( 5a | 30d | 5t )") ) {formOE.setFormValue("40d") } else if ( formComplexity.getValue()==("70. Very Complex") ) { formOE.setFormValue("60d") } else { formOE.setFormValue("0h") }
It seems that ìs not recognizing the field Original estimates. Can someone help me?
Thanks,
S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://marketplace.atlassian.com/plugins/com.onresolve.jira.plugin.Behaviours
This plugin allows you to set behaviour schemes for your fields, e.g. Setting a field value dependent on other form data
Seems like exactly what you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.