Issue variables

When there is an issue event that the integrations triggers on, such as Issue Created, Issue Updated or Commented, then the issue will be available in the scope to use as variables.

Examples, variables accessed from the payload

Description

 

Examples, variables accessed from the payload

Description

 

{{issue.key}}

Issue key

 

{{issue.fields.summary}}

Issue summary

 

{{issue.fields.description}}

Issue description

 

{{issue.fields.project.name}}

Project name

 

{{issue.fields.priority.name}}

Priority name

 

 

Understanding the Variables:

  • JSON format: The variables involved are stored in a JSON format, a common way to structure data. It uses key-value pairs to organize information.

  • Execution log: View these variables by checking the execution log, which records events and data during a process.

  • Comment event: A specific event within the log, likely containing details about a comment.

Accessing Variable Values:

  • Dot notation: Use this syntax (.) to navigate through the JSON structure and access specific values within variables.

  • Example: To extract the name of the issue status from a variable named issue, use this syntax: {{issue.fields.status.name}}.

    • issue: Access the top-level variable.

    • fields: Dive into a nested property within issue.

    • status: Further navigate to a property within fields.

    • name: Finally, extract the specific value held within status.

Key Points:

  • Become familiar with JSON structure to effectively work with variables.

  • Use the execution log as a reference for inspecting available variables.

  • Dot notation is essential for accessing specific values within the JSON structure.

{ "comment": { "author": { "accountId": "5ee9eea44784510aca6df3d0", "avatarUrls": { "48x48": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "24x24": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "16x16": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "32x32": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png" }, "displayName": "Peter Atthem", "accountType": "atlassian", "self": "https://rixterdev.atlassian.net/rest/api/2/user?accountId=5ee9eea44784510aca6df3d0", "active": true, "timeZone": "Europe/Berlin" }, "created": "2024-03-09T10:11:24.879+0100", "updateAuthor": { "accountId": "5ee9eea44784510aca6df3d0", "avatarUrls": { "48x48": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "24x24": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "16x16": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png", "32x32": "https://secure.gravatar.com/avatar/f40ffde01bd9f29b801f1b93b087c712?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FPA-0.png" }, "displayName": "Peter Atthem", "accountType": "atlassian", "self": "https://rixterdev.atlassian.net/rest/api/2/user?accountId=5ee9eea44784510aca6df3d0", "active": true, "timeZone": "Europe/Berlin" }, "self": "https://rixterdev.atlassian.net/rest/api/2/issue/111159/comment/10849", "jsdPublic": true, "id": "10849", "body": "heh", "updated": "2024-03-09T10:11:24.879+0100" }, "webhookEvent": "comment_created", "eventType": "primaryAction", "issue": { "self": "https://rixterdev.atlassian.net/rest/api/2/111159", "id": "111159", "fields": { "summary": "jop", "issuetype": { "hierarchyLevel": 1, "name": "Epic", "self": "https://rixterdev.atlassian.net/rest/api/2/issuetype/10000", "description": "A big user story that needs to be broken down. Created by Jira Software - do not edit or delete.", "id": "10000", "iconUrl": "https://rixterdev.atlassian.net/images/icons/issuetypes/epic.svg", "subtask": false }, "project": { "simplified": false, "avatarUrls": { "48x48": "https://rixterdev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10410", "24x24": "https://rixterdev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10410?size=small", "16x16": "https://rixterdev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10410?size=xsmall", "32x32": "https://rixterdev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10410?size=medium" }, "name": "PFD", "self": "https://rixterdev.atlassian.net/rest/api/2/project/10024", "id": "10024", "projectTypeKey": "software", "key": "TWLA" }, "assignee": null, "priority": { "name": "Medium", "self": "https://rixterdev.atlassian.net/rest/api/2/priority/3", "iconUrl": "https://rixterdev.atlassian.net/images/icons/priorities/medium.svg", "id": "3" }, "status": { "name": "Backlog", "self": "https://rixterdev.atlassian.net/rest/api/2/status/10014", "description": "", "iconUrl": "https://rixterdev.atlassian.net/", "id": "10014", "statusCategory": { "name": "To Do", "self": "https://rixterdev.atlassian.net/rest/api/2/statuscategory/2", "colorName": "blue-gray", "id": 2, "key": "new" } } }, "key": "TWLA-16" }, "matchedWebhookIds": [ 10069 ], "timestamp": 1709975484879 }