public class

SearchRequestUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.search.SearchRequestUtils

Summary

Public Constructors
SearchRequestUtils()
Public Methods
static SearchContext getCombinedSearchContext(SearchContext baseSearchContext, SearchContext possibleContext)
Creates the most specific SearchContext possible from the two parameters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SearchRequestUtils ()

Public Methods

public static SearchContext getCombinedSearchContext (SearchContext baseSearchContext, SearchContext possibleContext)

Creates the most specific SearchContext possible from the two parameters. The baseSearchContext is used as the parent context and the possibleContext is used to narrow it down. Thus if the possibleContext contains Project A and the baseSearchContext is global, a context with Project A will be returned. If baseSearchContext is Project A & Project B the Project A will be returned. If baseSearchContext is only Project B, then Project B will be returned. The same logic applies for issue types.

Parameters
baseSearchContext the base parent context
possibleContext the context to try to narrow the baseSearchContext on
Returns
  • a combineed SearchContext object based on the baseSearchContext. Null if baseSearchContext is null