Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | createIssue(projectKey, parentIssueKey, issueType, summary[, priority, description, components, due date, | estimate, security_level, field_mappings]) | Package | | Alias | | Pkg Usage | |
|
Description
Excerpt |
---|
|
Creates an issue based on the provided arguments. |
Creates an issue based on the provided arguments.
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
projectKey | String | Yes | Key of the project, where the issue will be created, as it is saved in the Administration part. | parentIssueKey | String | Yes | Key of the parent issue. Though the parameter is required, it can take an empty value to specify that the issue is not a sub-task, but a regular issue. | issueType | String | Yes | Type of the issue that will be created. | summary or issueSummary | String | Yes | Summary of the issue that will be created. | priority | String | No | Priority. | description | String | No | Description of the issue that will be created. | components | array of strings | No | Components of the issue that will be created. | due date | Datedate | No | Due date of the issue that will be created. |
estimate | intervalNo | Original estimate of the issue that will be created. | security level | String | No | Security level of the issue that will be created. | custom fields mappings/field mappings (since version 3.0.2) | array of strings | No | Mappings of the custom field of the issue that will be created.Starting with version 3.0.2 the mappings of the custom and system fields of the issue will be created. |
|
Return Type
String
The key of the created issue
...
Example
...
Code Block |
---|
string issue_priority;//Possible values: "Major", "Critical" etc.
string issue_description;
string[] issue_components;
string issue_security_level;
string[] custom_fields_mapping;
issue_priority = "Critical";
issue_description = "Description of the issue";
issue_components = components; //an array containing all the components of the current project
issue_security_level = "Administrator";
custom_fields_mapping = "STDUP|fmanaila|STDGP|jira-users";
string k = createIssue(
"PROJECT",
"PRJ-300",
"Sub-task",
"Summary of the sub task" ,
issue_priority,
issue_description,
issue_components,
currentDate() + "30d",
"1h 30m",
issue_security_level,
custom_fields_mapping
);
print ("On the project " + project + ", issue " + k + "is created."); |
Result: On the project PROJECT, issue PRJ-300 is created. Issue details are as declared above.
Example 2
...
Code Block |
---|
|
string issue_priority;//Possible values: "Major", "Critical" etc.
string issue_description;
string issue_security_level;
issue_priority = "Critical";
issue_description = "Description of the issue";
issue_security_level = "Administrator";
string k = createIssue(
"PROJECT",
"", // passing in empty to create a regular issue rather than subtask
"Bug",
"Summary of the sub task" ,
issue_priority,
issue_description,
{}, // no components
currentDate() + "30d",
"1h 30m",
issue_security_level,
{} // and no custom field mappings
);
print ("On the project " + project + ", issue " + k + "is created."); |
Will create a Bug with no components and no special custom field values (all defaults).
Example 3
Code Block |
---|
string issue_priority;//Possible values: "Major", "Critical" etc.
string issue_description;
string[] issue_components;
string issue_security_level;
string[] custom_fields_mapping;
issue_priority = "Critical";
issue_description = "Description of the issue";
issue_components = components; //an array containing all the components of the current project
issue_security_level = "Administrator";
custom_fields_mapping = "STDUP|fmanaila|STDGP|jira-users";
string k = createIssue(
"PROJECT",
"PRJ-300",
"Sub-task",
"Summary of the sub task" ,
issue_priority,
issue_description,
issue_components,
currentDate() + "30d",
"1h 30m",
issue_security_level,
custom_fields_mapping
);
print ("On the project " + project + ", issue " + k + "is created."); |
Will create an Improvement with no components and the assignee set for user with the username "someUserName".
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "jira_issue_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|