Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

zhangxq
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 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
TAGS
AUG Leaders

Atlassian Community Events