Only Assignee of Epic can create tasks in Epic

Tim Serguo May 17, 2023

Hi,

this is my first post, so it is nice to say hello to all of you!

I need to prepare a Scriptrunner validator to create transition to:

  • allow creation subtask only for assigne of the task - and it works:
    def ParentIssue = issue.getParentObject()
    currentUser == ParentIssue.assignee
  • allow creation tasks in Epic only for the assignee of the Epic - and I have no idea how to achieve this one. I cannot find anything similar in the community as well.

I hope anyone will have ideas! :) 

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

I haven't tried it...

But see if you get get the value of the custom field "Epic Link" from your new issue during the creation transition.
This should be either an issue key (string) or an issue object.

From there, compare the assignee for the issue in that field against the current user.

If the field is empty, that means this link is established after the fact and a workflow validator on the creation transition will not work.

You might want to attempt using a fragment to just hide the "create issue in epic" web item based on whether or not the current user is the assignee of the current issue.

But that won't prevent a user from later associating an issue with an epic either with just drag/drop in a scrum board or via editing the epic link field manually (either one at a time or via a bulk edit).

Tim Serguo May 18, 2023

Thanks for suggestions!

Suggest an answer

Log in or Sign up to answer