Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

A same field should populate based on other 2 field values

PS July 6, 2020

Hi Folks,

I would like to Auto-populate a field based on other field values?

But here there is one challenge, the same text field should get populate when we select A & B values from the other field.

Here it is working only with one field value either A or B.

How should I make it work for both field values.

The script

def textField = getFieldByName("Data-Domain")
def selectList = getFieldByName("Sub-Issue Type")

def selectListValue = selectList.getValue()

if (selectListValue == "A")
{
textField.setHidden(false)
} else {
textField.setHidden(true)
}

 

If I write the same script for B value 

def textField = getFieldByName("Data-Domain")
def selectList = getFieldByName("Sub-Issue Type")

def selectListValue = selectList.getValue()

if (selectListValue == "B")
{
textField.setHidden(false)
} else {
textField.setHidden(true)
}

The Data-Domain is populating only for B value where as it needs to populate on both selections A & B.

Please suggest.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events