Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

scriptrunner behavior to clear the value of a selection list field does not work in JSD portal

Hi,

I have a simple behavior to clear the value of a selection field when the user selects No in another field, and the behavior does not work in the JSD portal. In the Jira UI works perfect (the selection list field value is cleared when the user selects No in another field), but in JSD portal just does not work. I have the proper mappings, so I have no clue why it does not work in JSD portal. Here is the server side script:

def SelectionListField = getFieldByName("List A")
def YesNoField = getFieldById(getFieldChanged())

def selectedOption = YesNoField.getValue() as String
def isYesSelected = selectedOption == "Yes"

SelectionListField.setHidden(! isYesSelected)
SelectionListField.setRequired(isYesSelected)

//clear SelectionListField value when YesNoField is No

if (!isYesSelected){

SelectionListField.setFormValue("")

}

 

I also tried this but it did not work:

SelectionListField.setFormValue(null)

 

And also tried this but it did not work either:

def optionsMap = ["-1": "None"]
SelectionListField.setFieldOptions(optionsMap)

 

As I said, in JIRA UI works fine but not in JSD portal.

 

Any ideas?

 

Thank you

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

106 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you