Workflow rule to set parent task Estimation based on subtasks' estimation
- 4
- 26
- Diego Bustamante
- Feb 05
The following rule is not working:
when subtask of.isNotEmpty && subtask of.first.Estimation == null && Estimation.changed {
var parent = subtask of.first;
parent.Estimation = parent.Estimation + Estimation;
}
Error: "Estimation:period is not subtype of instant or string."
when subtask of.isNotEmpty && subtask of.first.Estimation == null && Estimation.changed {
var parent = subtask of.first;
parent.Estimation = parent.Estimation + Estimation;
}
Error: "Estimation:period is not subtype of instant or string."
|
Question is not answered.
|
Hi Diaego,
it's the know bug and it hasn't fixed yet - http://youtrack.jetbrains.com/issue/JT-18128 - please vote/comment it.
it's the know bug and it hasn't fixed yet - http://youtrack.jetbrains.com/issue/JT-18128 - please vote/comment it.
You can change type of Estimation fieled to integer as well
(or use a custom filed of type integer).
Then there is no problem with adding these and the rule will look like
(I added type Story as we use the scrum here):
rule Set Story Estimation (in hours) when subtask Estimation changes
when issue.Estimation.changed {
if (issue.subtask of.isNotEmpty) {
for each parent in issue.subtask of {
var newEstimation = 0;
for each child in parent.parent for {
newEstimation = newEstimation + child.Estimation;
}
if (parent.Estimation != newEstimation) {
parent.Estimation = newEstimation;
}
}
}
}
(or use a custom filed of type integer).
Then there is no problem with adding these and the rule will look like
(I added type Story as we use the scrum here):
rule Set Story Estimation (in hours) when subtask Estimation changes
when issue.Estimation.changed {
if (issue.subtask of.isNotEmpty) {
for each parent in issue.subtask of {
var newEstimation = 0;
for each child in parent.parent for {
newEstimation = newEstimation + child.Estimation;
}
if (parent.Estimation != newEstimation) {
parent.Estimation = newEstimation;
}
}
}
}
Hi,
I tried converting the Estimation field to integer from period, but I was unable to do so because:
'Can't change type for prototype, as it is used in time tracking.'
I already tried disabling time tracking for the project. I also tried creating another field of type int, but I don't know how to cast period to integer to migrate the current estimations.
Is there a workaround for this? The end goal for this is to know how much work is left in a story.
Thanks.
I tried converting the Estimation field to integer from period, but I was unable to do so because:
'Can't change type for prototype, as it is used in time tracking.'
I already tried disabling time tracking for the project. I also tried creating another field of type int, but I don't know how to cast period to integer to migrate the current estimations.
Is there a workaround for this? The end goal for this is to know how much work is left in a story.
Thanks.
Hi,
I tried converting the Estimation field to integer from period, but I was unable to do so because:
'Can't change type for prototype, as it is used in time tracking.'
I already tried disabling time tracking for the project. I also tried creating another field of type int, but I don't know how to cast period to integer to migrate the current estimations.
Is there a workaround for this? The end goal for this is to know how much work is left in a story.
Thanks.
I tried converting the Estimation field to integer from period, but I was unable to do so because:
'Can't change type for prototype, as it is used in time tracking.'
I already tried disabling time tracking for the project. I also tried creating another field of type int, but I don't know how to cast period to integer to migrate the current estimations.
Is there a workaround for this? The end goal for this is to know how much work is left in a story.
Thanks.
<< Newer