Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Script Runner Behaviours-10 different field pop-ups

Hello- I have a custom checkbox field in JIRA with a list of about thirty applications that a user may require.  For ten of these, the user's manager must also fill out the type of access required.  I created a behavior that unhides an additional field if any (or all) of these ten apps are checked off.  It works perfectly except for one problem:  If I select any one of the ten apps, then DESELECT it, the additional field DOES NOT get hidden again.  Can somebody tell me what I am missing?

Thank you, in advance.



My Initializer:

def hiddenField01 = getFieldByName('Access-CAMRA')
def hiddenField02 = getFieldByName('Access-CAMRA Hub')
def hiddenField03 = getFieldByName('Access-DnD')
def hiddenField04 = getFieldByName('Access-GP')
def hiddenField05 = getFieldByName('Access-Nexus')
def hiddenField06 = getFieldByName('Access-North Shore')
def hiddenField07 = getFieldByName('Access-Piculet')
def hiddenField08 = getFieldByName('Access-Recon')
def hiddenField09 = getFieldByName('Access-Dashboard')
def hiddenField10 = getFieldByName('Access-XBasis')


...And my Fields:

def CAMRAField = getFieldByName("Access-CAMRA")
def CAMRAchangedField = getFieldById(getFieldChanged())
def selectedOption1 = CAMRAchangedField.getValue() as String
def isCAMRASelected = selectedOption1.contains("CAMRA")
CAMRAField.setHidden(! isCAMRASelected)

def CAMRAHubField = getFieldByName("Access-CAMRA Hub")
def CAMRAHubchangedField = getFieldById(getFieldChanged())
def selectedOption2 = CAMRAHubchangedField.getValue() as String
def isCAMRAHubSelected = selectedOption2.contains("CAMRA Hub")
CAMRAHubField.setHidden(! isCAMRAHubSelected)

def DnDField = getFieldByName("Access-DnD")
def DnDchangedField = getFieldById(getFieldChanged())
def selectedOption3 = DnDchangedField.getValue() as String
def isDnDSelected = selectedOption3.contains("DnD")
DnDField.setHidden(! isDnDSelected)

def DGPField = getFieldByName("Access-GP")
def DGPchangedField = getFieldById(getFieldChanged())
def selectedOption4 = DGPchangedField.getValue() as String
def isDGPSelected = selectedOption4.contains("Dynamics GP")
DGPField.setHidden(! isDGPSelected)

def NexusField = getFieldByName("Access-Nexus")
def NexuschangedField = getFieldById(getFieldChanged())
def selectedOption5 = NexuschangedField.getValue() as String
def isNexusSelected = selectedOption5.contains("Nexus")
NexusField.setHidden(! isNexusSelected)

def NSField = getFieldByName("Access-North Shore")
def NSchangedField = getFieldById(getFieldChanged())
def selectedOption6 = NSchangedField.getValue() as String
def isNSSelected = selectedOption6.contains("North Shore Asset Management System")
NSField.setHidden(! isNSSelected)

def PiculetField = getFieldByName("Access-Piculet")
def PiculetchangedField = getFieldById(getFieldChanged())
def selectedOption7 = PiculetchangedField.getValue() as String
def isPiculetSelected = selectedOption7.contains("Piculet")
PiculetField.setHidden(! isPiculetSelected)

def ReconField = getFieldByName("Access-Recon")
def ReconchangedField = getFieldById(getFieldChanged())
def selectedOption8 = ReconchangedField.getValue() as String
def isReconSelected = selectedOption8.contains("Recon")
ReconField.setHidden(! isReconSelected)

def WDField = getFieldByName("Access-Dashboard")
def WDchangedField = getFieldById(getFieldChanged())
def selectedOption9 = ReconchangedField.getValue() as String
def isWDSelected = selectedOption9.contains("Web Dashboard")
WDField.setHidden(! isWDSelected)

def XBField = getFieldByName("Access-XBasis")
def XBchangedField = getFieldById(getFieldChanged())
def selectedOption10 = ReconchangedField.getValue() as String
def isXBSelected = selectedOption10.contains("XBasis")
XBField.setHidden(! isXBSelected)

0 answers

Suggest an answer

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

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

179 views 2 1
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