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,364,683
Community Members
 
Community Events
168
Community Groups

hwo to restricting componet's value when I create a issue.

zhangxq I'm New Here Aug 14, 2022

Hi guys,

There are 190+ components in projec. I want only "Hardware" and "HWQ" show and hide others but it not work.

 

 

import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.*
def Component = getFieldById("Component/s");
def CompValue = Component.getFormValue();
def allowedComponents = ["Software", "HWQ", "HW"]
Component.setFormValue(allowedComponents)

 

 

Dingtalk_20220815095007.jpg

0 answers

Suggest an answer

Log in or Sign up to answer