Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=createIssue+-+15486180
widthauto

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

createIssue(projectKey, parentIssueKey, issueType, summary[, priority, description, components, due date, estimate, security_level, field_mappings])

Package

Alias

Pkg Usage

...

Will create an Improvement with no components and the assignee set for user with the username "someUserName".

Example 4

Code Block
JFieldValue[] cfMappings;
JFieldValue cfValues;
cfValues.fieldName = "my_multi_field";
for(int i=0; i<3; ++i) {
    string tempLabel = "my label " + i;
    string tempVal = "my value " + i;

    cfValues.values[i*2] = tempLabel;
    cfValues.values[i*2 + 1] = tempVal;
}
cfMappings += cfValues;
createIssue("JSD", "", "Task", "summaryyy", "", "", "", "", "", "", cfMappings);
print ("On the project " + project + ", issue " + k + "is created.");

Will create a Task, on the ‘JSD’ project, and will fill the ‘my_multi_field’ with 3 values (“my label 0”, “my label 1” and “my label 2”).

This is useful, for example if you have a field that allows multiple values to be selected (E.G. Power Custom Fields' - “PCF - Multi Select“.

Optionally, for Power Custom Fields, you can set the option’s value. If you don’t want the option’s value set, you can just use simple strings instead of the JFieldValue structure.

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "issue_routine" and space = currentSpace ( )
labelsarray_routines