The issue has unresolved dependencies and thus cannot be set Fixed!

Hello all and Happy new year,
I have an issue with you track with the jetbrains-youtrack-dependencies workflow.
We had a task with 2 dependencies set to done and a parent set to open. And we wasn't able to set the issue to fixed until we removed the parent.
So it seems that in the workflow the "depends on" also includes the parents.
Thanks for all the hard work and the nice softwares.
Regards
8 comments
Comment actions Permalink
Forgot to say that we use the Youtrack InCloud service
0
Comment actions Permalink
After further investigation, the parent of the task depends on a task which is not resolved, seems to be the root of the issue.
0
Comment actions Permalink
Yep, this workflow disallows to fix issue unless all required issues are resolved: "The issue has unresolved dependencies and thus cannot be set Fixed!"

If you don't need it in your project just detach this workflow from the project.
0
Comment actions Permalink
Hello Dmitry,
thanks for your answer, I totally get that the rule is used to forbid to fix a task with unresolved dependencies and that's something we want.
The issue is that the rules not only consider the dependencies for the current task but also for his parent which seems wrong to me.
Regards
Yann
0
Comment actions Permalink
Please provide the exact error message.

I guess the problem can be in the other attached workflow - jetbrains-youtrack-subtasks, - could you please review the code or export it and attach here?

And also please review all the attached workflows.
0
Comment actions Permalink
Hello,
the code for the subtasks seems fine:
rule Update subtasks Subsystem on parent Subsystem changing 
 
when Subsystem.changed { 
  for each subtask in parent for { 
    if (project != subtask.project && issue.project.valuesFor(Subsystem).first != subtask.project.valuesFor(Subsystem).first) { 
      continue; 
    } 
     
    if (subtask.Subsystem == Subsystem.oldValue) { 
      subtask.Subsystem = Subsystem; 
    } 
  } 
}
prettyPrint();
The exact message is
Assertion error caused by: The issue has unresolved dependencies and thus cannot be set Fixed!


We have a rule to set the parent resolution to the lowest resolution of his children (basically an autofix) which is:
rule set Lowest Child Resolution To Parent 
 
when (State.becomes({Done}) || State.becomes({Fixed})) && subtask of.isNotEmpty { 
  var parent = subtask of.first; 
  var parentState = State; 
  var allResolved = true; 
  for each task in parent.parent for { 
    if (task.State.ordinal < parentState.ordinal) { 
      parentState = task.State; 
    } 
    if (!task.State.isResolved) { 
      allResolved = false; 
    } 
  } 
  if (parent.State.ordinal != parentState.ordinal && (parentState.name == "Done" || parentState.name == "Fixed") && allResolved == true) { 
    parent.applyCommand("State " + parentState.name); 
  } 
}
prettyPrint();
But that doesn't seems to be the cause of the problem.

Regards
Yann
0
Comment actions Permalink
After further investigation, the parent of the task depends on a task which is not resolved, seems to be the root of the issue.


I guess the rule 'set Lowest Child Resolution To Parent' in your case sets the parent State to the lowest child state, e.g. to unresolved state.

So the next workflow  in chain 'jetbrains-youtrack-dependencies' throws assertion.

I guess if you detach the workflow 'set Lowest Child Resolution To Parent' everything will work as expected.

Please check it.
0
Comment actions Permalink
Ok,
seems to work.
Thanks a lot for the support.
Regards
0

Please sign in to leave a comment.