findOption (qcHelper)

    Signature

    HelperqcHelper
    Signature
    findOption(String criteriaValue, List options)
    Description

    Returns an option from the specified list of options and its children option.

    Returns null if an option is not found.

    Introduced in1.0.0

    Example use

    Use this method to set an option from the list into the custom field.

    // BG_USER_01 - the name of the user field in HP ALM/QC instance; "My option" is the option value
    issue.customFields."BG_USER_01".value = qcHelper.findOption(
      "My Option", 
      qcHelper.getOptions("BG_USER_01")
    )?.value