Trigger condition objects

To set trigger conditions, specify one or more objects.

Events

Parameter Description Acceptable values Data type
type Condition type Possible values:
  • Event.update: Issue changed.
  • CalculationFormulaWatch: Formula fields changed.
  • Event.comment-create: Comment created.
  • Event.create: Issue created.
String

Example: The trigger fires if the issue is changed.

{"type": "Event.update"}

Checklist

Parameter Description Acceptable values Data type
type Condition type ChecklistDone String

Example: The trigger fires if all items on the checklist are completed.

{"type": "ChecklistDone"}

Comment Text

Parameter Description Acceptable values Data type
type Condition type Possible values:
  • CommentNoneMatchCondition: Doesn't contain any fragments.
  • CommentStringNotMatchCondition: Doesn't contain the fragment.
  • CommentFullyMatchCondition: Matches.
  • CommentAnyMatchCondition: Contains any of the fragments.
  • CommentStringMatchCondition: Contains the fragment.
String
word Text of the comment Strings to search String or Array of strings
ignoreCase Ignore case true or false Boolean
removeMarkup Ignore markup true or false Boolean
noMatchBefore Parameter changed true or false Boolean

Type of data depending on the condition type

Condition type Data type
CommentNoneMatchCondition Array of strings
CommentStringNotMatchCondition String
CommentFullyMatchCondition String
CommentAnyMatchCondition Array of strings
CommentStringMatchCondition String

Example: The trigger fires if the comment doesn't contain the text Version 0.1 or Version 0.2, regardless of case or formatting.

{
	"type": "CommentNoneMatchCondition",
	"words": ["Version 0.1", "Version 0.2"],
	"ignoreCase": true,
	"removeMarkup": true,
	"noMatchBefore": false
}

Comment author

To check the authors of new comments, specify a condition type in type and add the parameter listed for that type.

Condition type

When the condition is met

Parameter

CommentAuthor

There is a new comment by the specified user

user

CommentAuthorNot

There is a new comment by another user

user

CommentAuthorInGroups

There is a new comment by a user who belongs to at least one of the specified groups

groups

CommentAuthorNotInGroups

There is a new comment by a user who does not belong to any of the specified groups

groups

CommentAuthorContainsAll

The authors of new comments include all the specified users

authors

CommentAuthorContainsAny

The authors of new comments include at least one of the specified users

authors

CommentAuthorContainsNone

The authors of new comments do not include any of the specified users

authors

Example: The condition is met if at least one new comment was posted by the user with the user1 login.

{
  "type": "CommentAuthor",
  "user": "user1"
}

The CommentAuthor and CommentAuthorNot types, as well as CommentAuthorInGroups and CommentAuthorNotInGroups, check comments individually. The condition is met if at least one new comment matches it. The CommentAuthorContainsAll, CommentAuthorContainsAny, and CommentAuthorContainsNone types compare the set of authors of new comments in the current update with the users in authors.

Parameter

Description

Data type

type

Condition type from the table above

String

user

User login or ID. For an object, you can specify a field such as id or login

String, number, or object

authors

Users to compare with the set of authors. Specify each item in the same way as the user parameter

Array of strings, numbers, or objects

groups

Group IDs or URLs. For an object, you can specify the id or url field. The array must contain at least one group

Array of strings, numbers, or objects

Example: The condition is met if the authors of new comments in the current update include both user1 and user2.

{
  "type": "CommentAuthorContainsAll",
  "authors": ["user1", "user2"]
}

In responses to Getting trigger parameters requests, conditions with the types CommentAuthorContainsAll, CommentAuthorContainsAny, and CommentAuthorContainsNone are returned with the type CommentAuthorContainerConditionProto. The selected variant is specified in subtype. For details, see the condition fields.

Comment type

Parameter Description Acceptable values Data type
type Condition type Possible values:
  • CommentMessageInternal: Comment in Tracker
  • CommentMessageExternal: Email
String
user Comment author User ID String

Examples

  1. The trigger fires if the comment type is Comment in Tracker.
    { "type": "CommentMessageInternal" }
    
  2. The trigger fires if the comment type is Email.
    { "type": "CommentMessageExternal" }
    

Action with link

Parameter Description Acceptable values Data type
type Condition type Possible values:
  • UpdatedLinkCondition: Link updated.
  • CreatedLinkCondition: Link created.
  • RemovedLinkCondition: Link deleted.
String
relationship Type of links between issues Link list Array of strings
Link types
  • relates: Simple link.
  • is dependent by: The current issue blocks the linked one.
  • depends on: The current issue depends on the linked one.
  • is subtask for: The current issue is a sub-issue of the linked one.
  • is parent task for: The current issue is a parent issue of the linked one.
  • duplicates: The current issue duplicates the linked one.
  • is duplicated by: The linked issue duplicates the current one.
  • is epic of: The current issue is an epic of the linked one. You can only set this type of link for Epic-type issues.
  • has epic: The linked issue is an epic of the current one. You can only set this type of link for Epic-type issues.

Example: The trigger fires if the issue is unlinked from its parent issue and Epic-type issue.

{ "type": "RemovedLinkCondition", "relationship": ["is parent task for", "is epic of"] }

Issue fields

In general, a trigger condition linked to an issue field can be described using an object with two required parameters:

Parameter Description Acceptable values Data type
type Condition type CONDITION_ID String
field Issue field FIELD_ID String

An object may also contain additional parameters.

Possible values of condition types depend on specific issue fields. Additional object parameters depend on a combination of required parameters.

Field value

For most fields, the following three condition types associated with a field value are available:

Condition type Description Additional parameters Data type
FieldChangedCondition Field value changed Without parameters
FieldEquals is equal to value String
FieldBecameEqual became equal to value String. For fields that can contain several values, such as Pending reply from, an array. See Pending reply from field
List of fields that conditions apply to
Field ID
Queue queue
Type type
Priority priority
Key key
Issue summary
Description * description
Status status
Resolution resolution
Status Changed statusStartTime
Created createdAt
Updated updatedAt
Resolved resolvedAt
Last Comment lastCommentUpdatedAt
Deadline deadline
Start Date start
End Date end
Author createdBy
Assignee assignee
Followers followers
Access access
Modifier updatedBy
Resolved by resolvedBy
Mailing lists followingMaillists
Project project
Tags tags
Components components
Affected Version affectedVersions
Fix Version fixVersions
Parent issue parent
Old queue previousQueue
Voted By votedBy
Votes votes
Number of comments without message commentWithoutExternalMessageCount
Number of comments with message commentWithExternalMessageCount
Boards boards
Pending reply from pendingReplyFrom
Previous queue lastQueue
Total participation percentage participantPercentsTotal
Possible spam possibleSpam
Status type statusType
QA Engineer qaEngineer
Original Estimate originalEstimation
Estimate estimation
Time Spent spent
Epic epic
Story Points storyPoints
Sprint sprint
Email from * emailFrom
Email To emailTo
Email CC emailCc
Created by email to * emailCreatedBy

* For the fields marked with an asterisk, the Is equal to the string (FieldEqualsString) condition type is used instead of is equal to (FieldEquals).

Examples:

  1. The trigger fires if the value of the Priority field changes.
    { "type": "FieldChangedCondition", "field": "priority" }
    
  2. The trigger fires if the value of the Priority field is Blocker.
    { "type": "FieldEquals", "field": "priority", "value": "blocker" }
    
  3. The trigger fires if the value of the Priority field changes to Blocker.
    { "type": "FieldBecameEqual", "field": "priority", "value": "blocker" }
    

Field state

Conditions related to whether a field contains a value:

Condition type Description Additional parameters
FieldIsNotEmpty Field value is not empty Without parameters
FieldIsEmpty Field value is empty Without parameters
FieldBecameEmpty Field value deleted Without parameters
FieldBecameNotEmpty Field value set Without parameters
List of fields that conditions apply to
Field ID
Description description
Resolution resolution
Status Changed statusStartTime
Resolved resolvedAt
Last Comment lastCommentUpdatedAt
Deadline deadline
Start Date start
End Date end
Assignee assignee
Followers followers
Access access
Resolved by resolvedBy
Mailing lists followingMaillists
Project project
Tags tags
Components components
Affected Version affectedVersions
Fix Version fixVersions
Parent issue parent
Old queue previousQueue
Voted By votedBy
Boards boards
Pending reply from pendingReplyFrom
Previous queue lastQueue
Total participation percentage participantPercentsTotal
Possible spam possibleSpam
Status type statusType
QA Engineer qaEngineer
Original Estimate originalEstimation
Estimate estimation
Time Spent spent
Epic epic
Story Points storyPoints
Sprint sprint
Email From emailFrom
Email To emailTo
Email CC emailCc
Created by email to emailCreatedBy

Examples:

  1. The trigger fires if the issue already has an assignee.
    { "type": "FieldIsNotEmpty", "field": "assignee" }
    
  2. The trigger fires if the issue doesn't have an assignee.
    { "type": "FieldIsEmpty", "field": "assignee" }
    
  3. The trigger fires if the Assignee field is cleared.
    { "type": "FieldBecameEmpty", "field": "assignee" }
    
  4. The trigger fires if the Assignee field is filled in.
    { "type": "FieldBecameNotEmpty", "field": "assignee" }
    

Pending reply from field

The Pending reply from field (pendingReplyFrom) can contain several users. The field state conditions and the FieldBecameEqual condition are available for it.

In both conditions, pass the "pendingReplyFrom" string in the field parameter. Do not pass an object with the self, id, and display fields, as in the response to the Getting trigger parameters request.

Condition

When it fires

Parameters

FieldBecameNotEmpty

The field got at least one value

field

FieldBecameEqual

The set of users in the field became equal to the set from the value parameter

field, value

For this field, the value parameter of the FieldBecameEqual condition is an array of users. Each array element is a user login or an object with the login in the id field. The order of users does not matter, but the set in the field must match the array exactly: if value contains one user and the field now contains two, the condition is not met.

Examples:

  1. The trigger fires if the Pending reply from field became non-empty.
    { "type": "FieldBecameNotEmpty", "field": "pendingReplyFrom" }
    
  2. The trigger fires when the set of users in the Pending reply from field becomes equal to the set of one user, user1. If the field contained other users before the change and only user1 after it, the condition is met. If the set was already the same, the condition is not met.
    { "type": "FieldBecameEqual", "field": "pendingReplyFrom", "value": ["user1"] }
    
  3. The trigger fires when the set of users in the Pending reply from field becomes equal to the set of two users, user1 and user2. If the set was different before the change and only these two users are in the field after it, the condition is met. If the set was already the same, the condition is not met.
    { "type": "FieldBecameEqual", "field": "pendingReplyFrom", "value": [{"id": "user1"}, {"id": "user2"}] }
    

Date

Conditions related to dates:

Condition type Description Additional parameters Data type
DateEqualCondition The date matches value String in date format
DateGreaterCondition Later than the date value String in date format
DateGreaterOrEqualCondition Later than or equal to value String in date format
DateLessCondition Earlier than value String in date format
DateLessOrEqualCondition Earlier than or equal to value String in date format
List of fields that conditions apply to
Field ID
Status Changed statusStartTime
Created createdAt
Updated updatedAt
Resolved resolvedAt
Last Comment lastCommentUpdatedAt
Deadline deadline
Start Date start
End Date end

Examples:

  1. The trigger fires if the Created field is set to a date later than October 28, 2023.
    { "type": "DateGreaterCondition", "field": "createdAt", "value": "2023-10-28T09:25:00"}
    
  2. The trigger fires if the End date field is set to October 28, 2023, or earlier.
    { "type": "DateLessOrEqualCondition", "field": "end", "value": "2023-10-28T09:25:00"}
    

User groups

Conditions related to user groups:

Condition type Description Additional parameters Data type
UserInGroups The user is a member of one of the groups. value String or Array of strings
UserNotInGroups The user isn't a member of any of the groups. value String or Array of strings
List of fields that conditions apply to
Field ID
Author createdBy
Assignee assignee
Modifier updatedBy
Resolved by resolvedBy
QA Engineer qaEngineer

Examples:

  1. The trigger fires if the user who created the issue belongs to the group with ID 1.
    {"type": "UserInGroups", "field": "createdBy","value": "1"}
    
  2. The trigger fires if the user who created the issue doesn't belong to the group with ID 1.
    {"type": "UserNotInGroups", "field": "createdBy","value": ["1", "4"]}
    

Number of elements

Conditions related to element count:

Condition type Description Additional parameters Data type
Container.SizeGreater The number of elements is greater than value Number
Container.SizeGreaterOrEquals The number of elements is greater than or equal to value Number
Container.SizeLess The number of elements is less than value Number
Container.SizeLessOrEquals The number of elements is less than or equal to value Number
Container.SizeNotEquals The number of elements is not equal to value Number
Container.SizeEquals The number of elements is equal to value Number
ContainerContainsNone Doesn't contain any elements
  • value
  • noMatchBefore
  • Array
  • Boolean
ContainerContainsAll Contains all elements
  • value
  • noMatchBefore
  • Array
  • Boolean
ContainerContainsAny Contains any of the elements
  • value
  • noMatchBefore
  • Array
  • Boolean
List of fields that conditions apply to
Field ID
Followers followers
Access access
Tags tags
Components components
Affected Version affectedVersions
Fix Version fixVersions
Voted By votedBy
Boards boards
Pending reply from pendingReplyFrom
Sprint sprint
Email CC emailCc
Email To emailTo
Mailing lists followingMaillists

Examples:

  1. The trigger fires if the issue has five or more votes.
    { "type": "Container.SizeGreaterOrEquals", "field": "votedBy", "value": 5 }
    
  2. The trigger fires if the issue has exactly five components.
    { "type": "Container.SizeEquals", "field": "components", "value": 5 }
    
  3. The trigger fires if the Followers field ever contained the value user11 or user12.
    { "type": "ContainerContainsAll", "field": "followers", "value": ["user11", "user22"], "noMatchBefore": true }
    

Numeric values

Conditions related to numeric values:

Condition type Description Additional parameters Data type
GreaterCondition is greater than value Number
GreaterOrEqualCondition is greater than or equal to value Number
LessCondition is less than value Number
LessOrEqualCondition is less than or equal to value Number
BecameGreaterCondition became greater than value Number
BecameGreaterOrEqualCondition became greater than or equal to value Number
BecameLessCondition became less than value Number
BecameLessOrEqualCondition became less than or equal to value Number
List of fields that conditions apply to
Field ID
Votes votes
Number of comments without message commentWithoutExternalMessageCount
Number of comments with message commentWithExternalMessageCount
Total participation percentage participantPercentsTotal
Possible spam possibleSpam
Original Estimate originalEstimation
Estimate estimation
Time Spent spent
Story Points storyPoints

Examples:

  1. The trigger fires if the value in the Story Points field is less than or equal to five.
    { "type": "LessOrEqualCondition", "field": "storyPoints", "value": 5 }
    
  2. The trigger fires if the value of the Votes field is greater than five.
    { "type": "BecameGreaterCondition", "field": "votes", "value": 6 }
    

String values

Conditions related to string values:

Condition type Description Additional parameters Data type
ContainsNoneOfStrings Doesn't contain any fragments
  • value
  • ignoreCase
  • Array
  • Boolean
FieldEqualsString Is equal to the string
  • value
  • ignoreCase
  • String
  • Boolean
ContainsAnyOfStrings Contains any of the fragments
  • value
  • ignoreCase
  • Array
  • Boolean
List of fields that conditions apply to
Field ID
Key key
Issue summary
Description description
Email From emailFrom
Created by email to emailCreatedBy

Examples:

  1. The trigger fires if the issue description doesn't contain the values Test task and 12345, regardless of case or formatting.
    { "type": "ContainsNoneOfStrings", "field": "description", "value": ["Test task", "12345"], "ignoreCase": true }
    
  2. The trigger fires if the issue name is New-Task.
    { "type": "FieldEqualsString", "field": "summary", "value": "New-Task", "ignoreCase": false }