/// <summary> /// Search for issues, with a JQL (e.g. from a filter) /// See: https://docs.atlassian.com/jira/REST/latest/#d2e2713 /// </summary> /// <param name="jiraClient">IIssueDomain to bind the extension method to</param> /// <param name="jql">Jira Query Language, like SQL, for the search. Use Where builder</param> /// <param name="startAt">Start of the results to return, used for paging. Default is 0</param> /// <param name="maxResults">Maximum number of results returned, default is 20</param> /// <param name="fields">Jira fields to include, if null the defaults from the JiraConfig.SearchFields are taken</param> /// <param name="expand"> /// Additional fields to includes in the results, if null the defaults from the /// JiraConfig.ExpandSearch are taken /// </param> /// <param name="cancellationToken">CancellationToken</param> /// <returns>SearchResults</returns> public static Task <SearchIssuesResult <Issue, JqlIssueSearch> > SearchAsync(this IIssueDomain jiraClient, IFinalClause jql, int maxResults = 20, int startAt = 0, IEnumerable <string> fields = null, IEnumerable <string> expand = null, CancellationToken cancellationToken = default) { return(jiraClient.SearchAsync(jql.ToString(), new Page { MaxResults = maxResults, StartAt = startAt }, fields, expand, cancellationToken)); }
/// <summary> /// Constructor with a JQL clause and name /// </summary> /// <param name="name">Name</param> /// <param name="jql">IFinalClause</param> public Filter(string name, IFinalClause jql) { Name = name; Jql = jql.ToString(); }
/// <summary> /// Possible since 5.7 /// Search for issues, with a CQL (e.g. from a filter) see /// <a href="https://docs.atlassian.com/confluence/REST/latest/#d2e4539">here</a> /// </summary> /// <param name="confluenceClient">IContentDomain to bind the extension method to</param> /// <param name="cqlClause">Confluence Query Language clause, created via Where</param> /// <param name="cqlContext"> /// the execution context for CQL functions, provides current space key and content id. If this is /// not provided some CQL functions will not be available. /// </param> /// <param name="limit">Maximum number of results returned, default is 20</param> /// <param name="expandSearch">The expand value for the search, when null the value from the ConfluenceClientConfig.ExpandSearch is taken</param> /// <param name="cancellationToken">CancellationToken</param> /// <returns>Result with content items</returns> public static Task <Result <Content> > SearchAsync(this IContentDomain confluenceClient, IFinalClause cqlClause, string cqlContext = null, int limit = 20, IEnumerable <string> expandSearch = null, CancellationToken cancellationToken = default) { return(confluenceClient.SearchAsync(cqlClause.ToString(), cqlContext, limit, expandSearch, cancellationToken)); }
/// <summary> /// Constructor with a JQL clause /// </summary> /// <param name="jql">IFinalClause</param> public Filter(IFinalClause jql) { Jql = jql.ToString(); }
/// <summary> /// Search for issues, with a JQL (e.g. from a filter) /// See: https://docs.atlassian.com/jira/REST/latest/#d2e2713 /// </summary> /// <param name="jiraClient">IIssueDomain to bind the extension method to</param> /// <param name="jql">Jira Query Language, like SQL, for the search. Use Where builder</param> /// <param name="maxResults">Maximum number of results returned, default is 20</param> /// <param name="fields">Jira fields to include, if null the defaults from the JiraConfig.SearchFields are taken</param> /// <param name="cancellationToken">CancellationToken</param> /// <returns>SearchResult</returns> public static async Task <SearchResult <Issue> > SearchAsync(this IIssueDomain jiraClient, IFinalClause jql, int maxResults = 20, IEnumerable <string> fields = null, CancellationToken cancellationToken = default(CancellationToken)) { return(await jiraClient.SearchAsync(jql.ToString(), maxResults, fields, cancellationToken).ConfigureAwait(false)); }