Versions Compared

Key

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

...

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