Limit field options in JSD Form

Hello,

I would like to know if there is a way to limit the options users can choose in specific Form request types.

 

Specifically; I would like users filling out Form A to have options [1,2,3] for the Component/s field and have users filling out Form B to have options [3,4,5] for that same field.

I am looking into the Behaviors plugin from Adaptavist now, but I am not very familiar with it/groovy

2 answers

A native way to do it would be to split into two projects and use field contexts. I’m sure others can better help you with the Behaviors route.

I asked for help from a Java Dev over the weekend, and found a solution. It isnt the cleanest solution, but it it ensures that the correct components are selected

In the workflow Create transition I added the following Validator;

def myList = ["Apple", "Banana", "Orange"]
if (issue.labels.any{it.label=='ThisLabelisAHiddenFieldonForm'}) {
for (pc in issue.getComponents()) {
if (myList.contains(pc.name)) {
return true
}
}
}
return false

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Mar 09, 2018 in Jira Service Desk

E.L. Fridge's take on education, Jira Service Desk, and creative Jira use cases

...word of mouth, so by 2016, we were working with several other entities on campus to implement Jira Service Desk . The Atlassian motto of “for every team” has really come true for us in this case. We...

966 views 2 14
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you