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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,616
Community Members
 
Community Events
184
Community Groups

Behavior set cascading values

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 06, 2019

Hi,

I am looking the way to set the cascading values based on Issue type.

I was able to do for single selection using below code but how to set the cascading field type values similar to single selection in behavior

 

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import com.atlassian.jira.component.ComponentAccessor

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

// Get a pointer to my select list field
def selectList = getFieldByName("Activity Type")

// Get the issue type
//def ITName = underlyingIssue?.getIssueType().name
def ITName = issueContext.issueType.name


// Get access to the required custom field and options managers
//def customField = customFieldManager.getCustomFieldObject(selectList.getFieldId())
def fieldName = "Activity Type"
def field = getFieldByName(fieldName)
def customField = customFieldManager.getCustomFieldObjectByName(fieldName)
def fieldConfig = customField.getRelevantConfig(getIssueContext())

def options = optionsManager.getOptions(fieldConfig)

// Get the checkbox option value as a String
//def checkBoxVal = checkBox.getValue()

// Logic to do some actions depending on what check box value is selected
if (ITName == "Task") {
// define and set the required options when checkbox A is selected

//selectList.setFieldOptions(options.findAll {it.value in ['TST', 'TSTA',]});
def optionsMap = options.findAll {
it.value in ["TBD"] // list of options you want to show
}.collectEntries {
[
(it.optionId.toString()): it.value
]
}
field.setFieldOptions(optionsMap)

} else if (ITName == "Test Case") {
// define and set the required options when checkbox A is selected
def optionsMap = options.findAll {
it.value in ["Y","N"] // list of options you want to show
}.collectEntries {
[
(it.optionId.toString()): it.value
]
}
field.setFieldOptions(optionsMap)
}

1 answer

1 accepted

0 votes
Answer accepted
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 06, 2019

Hi @Omprakash Thamsetty 

 

Please check very helpful Adaptavist Script Runner library - https://library.adaptavist.com

As I know ther is now way to do this at this moment :/ This issue was created as an answer from Adaptavist for my question about that. I'm waiting for this.

 

Regards,

Seba

Omprakash Thamsetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 07, 2019

Hi @Sebastian Krzewiński ,

Even I was looking at forum about it and said that it is not possible to do this at this moment.

Thanks for the reply. I will also keep checking on the link you provided.

 

Thanks,

Om

is this feature still unavailable? No update on the issue

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 14, 2019

Yes, it is still unavailable

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events