...
...
Warning |
---|
Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here ! |
Contents
Table of Contents |
---|
Referencing an Issue
By default, the issue standard variables are pre-declared along with their synonyms. For instance,the key is an issue standard variable. You should avoid to re-declare it, since it will lead to subtle errors. We recommend you to prefix your variables with some certain string if you are unsure of its name.
There are some certain constructs that reflect the issue structure, for instance:
...
Tip | ||
---|---|---|
| ||
You will see the last construct comes in hand when used in cycles (for, while, do-while) or when creating an issue from SIL. |
Substitution
It often happens that you need the value of a variable designated by another value. For example, we might have a custom field that specifies which what certain data other field contains some data. The general syntax for substituting variables is:
...
Code Block | ||
---|---|---|
| ||
string myCustomField = "customfield_10000"; // myCustomField is a local variable %myCustomField% = "a value"; |
Standard Variables
Here is a list of the variables that are already defined in a SIL environment and which that you can use right away. Note that these are all standard issue fields.
...
Warning | ||
---|---|---|
| ||
Please do not attempt to redefine them. Redefinition is possible with the loss of the original meaning, so you will have subtle errors in your SIL code. |
...
Variable | Aliases | Type | Readonly | Explanations and Usage | |||||
---|---|---|---|---|---|---|---|---|---|
affectedVersions | affectedVersion | string [] | no | The affected versions field of the issue. If attempting to add an invalid value, it will be ignored. | |||||
assignee | - | string | no | The assignee of the issue. Represents the usernameuser key, not the real name. | |||||
attachments | attach | string [] | yes | The filenames of the attachments. There are routines to modify those
| |||||
components | component | string [] | no | The components of the issue. If attempting to add an invalid value, it will be ignored. | |||||
created | - | date | noyes | The date when the issue was created. | |||||
description | desc | string | no | The description of the issue. | |||||
dueDate | due | date | no | The due date of the issue.
| |||||
estimate | est | interval | no | This is displayed as "Remaining" in the JIRA Jira interface. Requires TimeTracking. | |||||
environment | env | string | no | The environment of the issue. | |||||
fixVersions | fixVersion | string [] | no | The fix versions field of the issue. If attempting to add an invalid value, it will be ignored. | |||||
id | - | number | yes | The id of the issue. | |||||
issueCreator | - | string | yes | Represents the user key of the creator. | |||||
issueType | type | string | no | The name of the issue type. | |||||
issueTypeId | - | string | no | The id of the issue type. | |||||
key | - | string | yes | The key of the issue. | |||||
labels | - | string [] | no | The labels of the issue. | |||||
originalEstimate | origEstimate | interval | no | The original estimate of the issue. Requires TimeTracking. | |||||
parent | - | string | no (yes, since 1.4.3) | The key of the parent issue. | |||||
parentId | - | number | no (yes, since 1.4.3) | The id of the parent issue. | |||||
priority | prio | string | no | The name of the priority. | |||||
priorityId | - | string | no | The id of the priority. | |||||
project | prj | string | no | The key of the project. | |||||
projectId | - | number | no | The id of the project. | |||||
reporter | - | string | no | Represents the username user key, not the real name of the reporter. | |||||
resolution | res resol | string | no | The name of the resolution. When set will also modify the resolution date. | |||||
resolutionDate | - | date | noyes | The current resolution date. If the resolution is modified, the date will also be updated. | |||||
resolutionId | resId resolId | string | no | The id of the resolution. When set will also modify the resolution date. | |||||
securityLevel | security | string | no | The name of the security level. | |||||
securityLevelId | securityId | number | no | The id of the security level. | |||||
status | - | string | yes | The name of the status. | |||||
statusId | - | string | yes | The id of the status. | |||||
summary | - | string | no | The summary of the issue. | |||||
timeSpent | spent | interval | no | The time spent (logged work) on the issue. Requires TimeTracking. | |||||
updated | - | date | yes | The date when this issue was last updated. It will update automatically after the current transition. | |||||
votes | - | number | no | The number of votes this issue has. | |||||
watchers | - | string [] | no | The watchers of the issue. The elements in the array are usernames.
| |||||
workflow | wrkflw | string | no (yes, since 1.4.3) | The workflow name of the issue.
| |||||
workflowId | - | number | no (yes, since 1.4.3) | The workflow id of the issue. |
Custom Fields
Aside from the standard issue fields, you can also access custom fields from SIL in selecting from the one of the following three ways:
- by id, using the construct customfield_xxxxx - where xxxxx is the ID of the custom field.
- by name - don't forget to use #{ and } if the name contains spaces.
- by its alias.
Code Block | ||
---|---|---|
| ||
customfield_10000 = "http://bugs.kepler-rominfo.com/browse/TST-1"; // referencing by id External = "http://bugs.kepler-rominfo.com/browse/TST-1"; // referencing by name #{External URL} = "http://bugs.kepler-rominfo.com/browse/TST-1"; // referencing by name with spaces |
...
Note | ||
---|---|---|
| ||
If you have multiple custom fields with the same name, the JIRA Jira API returns the first one it finds. |