Is there any way to get the list of issue based on combination of both the first level (1st option) and second level (2nd option) of cascade select custom field?
Issue:
I am able to get the list of issue based on the first level (1st option) of cascade select custom field but unable to get the list of issue based on the second level (2nd option) of cascade select custom field.
it is possible through the JQL query to get the list of issue based on combination of both the first level (1st option) and second level (2nd option) of cascade select custom field.
Requirement:
The first level (1st option) value "XYZ" and second level (2nd option) of cascade select custom field value where second level (2nd option) value is "ALL".
Example:
first level (1st option) value "XYZ"
second level (2nd option) value is "ALL".
second level (2nd option) value is "ABC".
second level (2nd option) value is "DEF".
The first level (1st option) value "XYZ" and second level (2nd option) of cascade select custom field value where second level (2nd option) value is "ALL".
To get the list of issue based on combination of both the first level (1st option) value (i.e. "XYZ") and second level (2nd option) individual group value ( (i.e. "ABC") if the second level (2nd option) selected value is "ALL".
try this search:
customfieldname in (1st option, 2nd option)
As per the code level Is there any way to get the list of issue based on combination of both the first level (1st option) value (i.e. "XYZ") and second level (2nd option) individual group value (i.e. "ABC")? List<Issue> issues = new ArrayList<Issue>(); SearchService searchServive = ComponentAccessor.getComponent(SearchService.class); final SearchService.ParseResult parseResult= searchServive.parseQuery(authenticationContext.getLoggedInUser(), (myJql.toString())); SearchResults searchResults = searchServive.search(authenticationContext.getLoggedInUser(),parseResult.getQuery(), PagerFilter.getUnlimitedFilter()); issues = searchResults.getIssues(); for (Issue issue : issues ) { HashMap<String, Option> hashMapEntriesCF = (HashMap<String, Option>) issue.getCustomFieldValue(customfield); if hashMapEntriesCF != null) { Option parentOpts = hashMapEntriesCF.get(null); Option childOpts = hashMapEntriesCF.get("1"); if(hashMapEntriesCF .size()>1){ log.info("Parent Group from CF "+ parentOpts.getValue().toString()); log.info("Child Group from CF "+ childOpts.getValue().toString()); log.info("Parent Group - Child Group ("+ parentOpts.getValue()+"-"+childSoln.getValue()+")"); ArrayList<Issue> existIssueArray1 = (ArrayList<Issue>)hashMapEntriesCF .get(parentOpts.getValue());// its working fine log.info("Exist Parent Group Issue Array "+existIssueArray1); ArrayList<Issue> existIssueArray2 = (ArrayList<Issue>)hashMapEntriesCF .get(childOpts.getValue());// its not working and getting null log.info("Exist Child Group Issue Array "+existIssueArray2 ); ArrayList<Issue> existIssueArray3 = (ArrayList<Issue>)hashMapEntriesCF .get(parentOpts.getValue()+"-"+childOpts.getValue());// its not working and getting null log.info("Exist Parent Group - Child Group Issue Array "+existIssueArray3); } } }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.