Examples
Do not allow editing an Epic once it has reached its final state
When Epic is Updated
Changed fields:
Filter: EntityState.IsFinal == true
Do not allow editing Epics not created by a specific user in the Test project
When Epic is Updated
Changed fields:
Filter: Creator.id != 145124 and Project.Name == 'Test'
Do not allow of PlannedEndDate of Bugs in Release 4214
When Bug is Updated
Changed fields: PlannedEndDate
Filter: Release.ID == 4124
Allow only the Creator, Admin and Assigned user to be able to assign people to a role within an entity
WHEN Assignment is Created
($Author.Id==GeneralUser.Id or Assignable.Assignments.Count(GeneralUser.Id ==$Author.Id)==0) and $Author.IsAdmin!=true and $Author.Id!=Assignable.Creator.Id
Do not allow change EntityState to Done if TimeSpent=0 (for Task)
When Task is Updated
Changed fields: EntityState
THEN do not allow any changes if:
EntityState.Name='Done' and TimeSpent=0
Definition of Done should be completed before an Entity moves to the next State
When: Feature is Updated
Changed Fields: Entity State
Then: DefinitionOfDones.Count(RelatedState = $Previous.EntityState.Name and EntityState.isFinal = false)>0
Entity State can be changed by Team Members only
When: Feature is Updated
Changed Fields: Entity State
Then: $Previous.EntityState.Id != EntityState.Id and AssignedTeams.Count>0 and AssignedTeams.Count(Team.TeamMembers.Count(User.Id==$Author.Id)>0)==0
Time can be added only upto 25th of each month
When: Time is Added
Then: DateTime.Now.Day >= 25 and Date < DateTime.Now.AddDays(-1)
Time can be added only in specific date range
When: Time is Added or Updated
Changed fields: Date, Spent
Then: Date>DateTime.Parse("2023-07-11") and Date<DateTime.Parse("2023-07-20")
Updated about 1 year ago