How to disable custom field value based on issue type?

G P November 19, 2019

attempts to use a solution from a 3 year old post (https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-disable-custom-field-value-based-on-issue-type/qaq-p/529895) results in several errors. Using v8.4 and is not liking the following:

def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)

  - cannot find matching method

Also under the "If" statement there is no such property/value for "it.value/it.optionId

if (issuetype.contains("Story")) {
    def optionsMap = options.findAll {
        it.value in ["A", "B"] // list of options you want to show
    }.collectEntries {
        [
                (it.optionId.toString()): it.value

tried suggestions to replace depreciated lines with no positive results.

 

0 answers

Suggest an answer

Log in or Sign up to answer