I have an existing builder as follows which is working in JIRA retriving issues.
JqlQueryBuilder builder = JqlQueryBuilder.newBuilder();
I have a custom field(id is 10000) that stores user object. Now I want to add this custom field to the builder object which is similar to assignee, reporter using or operator. How can i do that?
try with this code
CustomField cf = customFieldManager.getCustomFieldObjectByName("CustomField Name"); User cfValue=(User)issue.getCustomFieldValue(cf ); JqlClauseBuilder builder = JqlQueryBuilder.newClauseBuilder(); Query query = builder.customField(cf.getIdAsLong()).eq(cfValue.getName()).buildQuery(); SearchProvider searchProvider = ComponentAccessor.getComponentOfType(SearchProvider.class); SearchResults searchResults = searchProvider.search(query, ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(),PagerFilter.getUnlimitedFilter()); List<Issue> issues = searchResults.getIssues();
Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG