Forums

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

how to hide none from single list field

Swathi
May 12, 2023
I need to hide None option from single list can you please help me on this
//import com.onresolve.jira.groovy.user.FormField
//import com.atlassian. jira. component. ComponentAccessor
//import com.atlassianjira.issue.customfields.manager.OptionsManager
//import com.atlassian.jira. component. ComponentAccessor

def statesField = getFieldByName("States")
def countriesField = getFieldByName("Countries")

// Retrieve the selected value from the StatesField dropdown
def selectedValue = statesField.getValue()

// Define the countries to display for each state
def countryValues = [
    "Alaska": ["USA"],
    "Andhra Pradesh": ["India"],
    "Madhya Pradesh": ["India"],
    "Karnataka": ["India"],
    "Tamil Nadu": ["India"],
    "Telangana": ["India"],
    "California": ["USA"],
    "Texas": ["USA"],
    "New South Wales": ["Australia"],
    "Queensland": ["Australia"],
    "South Australia": ["Australia"],
]

// Set the available values of the CountriesField based on the selected value of the StatesField dropdown
countriesField.setFieldOptions(countryValues[selectedValue])

3 answers

0 votes
Andreas
Contributor
June 30, 2020

There is still the open feature ticket https://jira.xpand-it.com/browse/XRAY-1734

It should be part of the next major release.

Best regards

Andreas

0 votes
José Domingues [Xray]
Atlassian Partner
July 2, 2018

Hi CloudStrife,

1. Xray does not yet support test parameterization although we aim to address in the short term. For now, you may add the parameters in the comments section within the Test Run (in the execution screen of a given Test/Test Execution).

2. You can simply do a clipboard paste (use control+v in Windows) in the execution screen of a given Test Run

 

Best regards,

Xray Team

Daniel Cottrell
Contributor
September 7, 2018

I'm just glad to get a definitive answer.

We can do parameters if we can get access to Cucumber? I doubt we will get that but just asking.

Cheers.

José Domingues [Xray]
Atlassian Partner
September 14, 2018

Hi,

If you use Cucumber Scenario Outlines, you'll have a sort of test parameterization. The data, in this case, would be specified within the Examples section of the Cucumber Scenario Outline based test.

 

Best regards,

Xray Team

Like Andrew P Koops likes this
Igor Kokoz
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!
March 11, 2020

Hi,

Is parameterization still in development?

Like # people like this
0 votes
Daniel Cottrell
Contributor
June 22, 2018

Didn't realize this was an answer box, please could someone delete this?

Suggest an answer

Log in or Sign up to answer