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 revision Previous revision
Next revision
Previous revision
conditions [2018/04/12 08:06]
root added 2 more conditions
conditions [2018/04/13 10:39] (current)
root Added new condition
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: 2018/04/12 08:06 by root