Versions Compared

Key

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


Info
titleAvailability

This routine is available starting with SIL Engine™ 4.6.3.

Syntax

admUpdateCustomFieldOptions(fieldName, pathToFile, charset, actionForOldFieldValues, actionForExistingFieldValues, projectKeys, issueTypes, useDefaultScheme, reorder, updateExistingOptionsValues, applyActionsOnParentOptions)

...

Code Block
Parent1
 Child1
 Child2
Parent2
 Child3Child4

and as an input file, "updateoptions.txt", that has the following contents:

Code Block
PARENT1
 Child3
 Child2
 CHILD1
Parent2
 Child4Child5


Example 1.1 - Updating a Cascading Select Custom Field - 


Code Block
admUpdateCustomFieldOptions("CF_CASCADE", "updateoptions.txt", "", actionForOldFieldValues"DELETE", actionForExistingFieldValues"NONE", projectKeys{}, issueTypes{}, useDefaultSchemefalse, reorderfalse, updateExistingOptionsValuestrue, applyActionsOnParentOptionsfalse);

The resulted field options will now be:

Code Block
PARENT1
 CHILD1
 Child2
 

...

Child3
Parent2
 Child5

Option "Parent2 - Child4" is going to be removed, because the actionForOldFieldValues parameter is "DELETE".

Option "Parent1 - Child1" will be renamed to "PARENT1 - CHILD1" because the parameter updateExistingOptionsValues is set to true.

The new option "PARENT1 - Child3" is added at the end of the existing options because the parameter reorder was set to false.


Example 2

Code Block
admAddCustomFieldOption("New Option", "Select List", "TEST", "Bug");

...