Hi everyone,
I am not very experienced with jira expressions and I would need your help please.
I am trying to set up a validator to prevent users to close epics if the tasks and stories included in that epic are not done.
I am using Scriptrunner for this, where I need to set a jira expression to validate the statuses. So far, I tried several, just that it doesn't pass the test when I'm doing it:
First option:
issue.isEpic && issue.links.every(s => s.linkedissue.status.name == "Done")
This returns true even if I have an epic with still "in progress" tasks.
Second option:
issue.links.every(s => s.inwardIssue.status.name == "Done")
Same problem, gives me a true response even if the epic has "in progress" tasks.
What am I doing wrong?