User Tools

Site Tools


conditions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
conditions [2018/04/12 08:06] – added 2 more conditions rootconditions [2026/02/01 12:29] (current) – external edit 127.0.0.1
Line 32: Line 32:
 </code> </code>
  
-=== only allow transition if none of the values in custom fields are "Awaiting Approval" ===+=== Only allow transition if none of the values in custom fields are "Awaiting Approval" ===
  
 <code java> <code java>
Line 49: Line 49:
     return true     return true
 } }
 +</code>
 +
 +=== Allow only if user is member of role "Developers" in project OR "My Field" has value of "Field Value" ===
 +<code java>
 +import com.atlassian.jira.component.ComponentAccessor 
 +
 +def selectedMyField = cfValues['My Field'].toString()
 +
 +
 +def userUtil = ComponentAccessor.getUserUtil()
 +
 +    isUserMemberOfRole("Developers") || selectedMyField.equals("Field Value")
 +
 +
 </code> </code>
conditions.1523534774.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki