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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

Behaviours: How to get value from Request Type hidden field?


I have two fields:

  • Product
  • Component/s

I have the following code which sets Components based on Product field if the product fields is visible in the Portal Form. This works fine.


Behavior on field Product:

// Sets components per product
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript

import static com.atlassian.jira.issue.IssueFieldConstants.COMPONENTS

@BaseScript FieldBehaviours fieldBehaviours

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()
def projectComponentManager = ComponentAccessor.getProjectComponentManager()

def productField = getFieldById(getFieldChanged())
def productOption = productField.getValue() as String

def issueTypeField = getFieldById(COMPONENTS)
def components = projectComponentManager.findAllForProject(
def availableComponents = []

if(productOption == "Infinity Fabric"){
availableComponents.addAll(components.findAll { in ["App Server Console","App Viewer","Data Adapters",\
"Developer Portal","Engagement","Engagement Console","Enterprise App Store (EAS)","Environments","Identity Services",\
"Installer","Integration Services","Legacy Services","License Activation","Logic","Management Console",\
"MF Console","Object Services","Offline Sync","Orchestration","Publish (publishing services for desktopweb/spa)",\
"Reports","RTL","SDK","Security","Sync","Sync Server Console","User Management"] })
availableComponents.addAll(components.findAll { in ["Other"] })



When I hide the field with Preset Value, the above does not work.




Please can you advise how can I get value for the hidden field that my behavior script can set Components based on the Product (hidden value)?


0 answers

Suggest an answer

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

Learn how to request and manage app requests in the Marketplace

G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...

62 views 1 7
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