Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Need to prevent parent's assignee to be same as child's


I am trying to see what's wrong with the scriptrunner syntax - trying to put it in workflow validateScreen Shot 2022-09-12 at 8.43.38 PM.png

3 answers

0 votes

Hi @Saira ,

a workflow validator can help you on that during transition opertion. Btw, a ticket could be reassigned through an assign operation that doesn't involve a validator. 

what should i add to check if the assignee is not null for either child or parent task?

0 votes

Hi @Saira ,

You can select an issue > click Test > click View result for more script validator log.

Your script currently wrong syntax, it should be issue.parent.assignee.accountId != issue.assignee.accountId

If your issue-parent is issue - sub-task.

Hope this helps!

that did help!

But now I want to implement similar test for reporter

so I used

issue.parent.reporter.accountId != issue.assignee.accountId


but it does not prevent transition

nvm it worked!

what should i add to check if the assignee is not null for either child or parent task?

@Thuan_ Do Dang ,

One more question - now that you helped answer my first one :D 

I have a parent issue that has two subtasks - suppose task A and task B

I want task B's assignee to not be the same as task A's. Task A has a label, let's call that X.

How do I write a scriptrunner script to restrict transition of task B if task A and B have the same assignee ?

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events