Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No

App

Use Case

Server code

Cloud code

1

Adaptivist Scriptrunner for Jira

Must not be able transition the issue unless condition is true or it returns a truthy value

Code Block
languagegroovy
isUserMemberOfRole(“Administrators”)

Code Block
languagegroovy
user.getProjectRoles(project).map(p => p.name).includes("Administrators")

2

Adaptivist Scriptrunner for Jira

Transition must be blocked unless it returns a truthy value

Code Block
languagegroovy
import com.atlassian.jira.issue.Issue

issue.resolutionObject.name != null || issue.assignee != null 

Code Block
languagegroovy
issue.resolution.name != null || issue.assignee.displayName != null

Reference Links:

Jira Expression Types: https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference/#user

Scriptrunner Example Conditions: https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/conditions/example-conditions