Hello
I create a behaviour associated with the "Original Estimate" field. I mark the field as being "Required" and this works, I see a little red asterix beside the field on the sub-task creation form.
However, the following script does not work and when I leave the field empty, I can still create the sub-task, no error at all.
def originalEstimateField = getFieldById("timetracking_originalestimate")
def originalEstimateValue = originalEstimateField.getValue() as long
if (originalEstimateValue != null){
originalEstimateField.clearError()
}else{
originalEstimateField.setError("All sub-task require an original estimate.")
originalEstimateField.setFormValue(null)
}
I also tried this instead for the condition:
if (originalEstimateValue > 0){
Please help!
What are you trying to achieve here? I'm a bit confused about the error message you wrote.
Are you trying to make original estimate field for a subtask mandatory? If yes, when? During creation? Through out the subtask's lifecycle? Only during a specific transition?
Why does the error message states something about "all subtasks"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.