com.atlassian.jira.web.action.util
Interface PopularIssueTypesUtil

All Known Implementing Classes:
PopularIssueTypesUtilImpl

public interface PopularIssueTypesUtil

A utility interface to help determine which issue types are being created most often for a project/user context. Note that none of these methods ever deal in sub tasks, only "full" issue types are considered.

Since:
v4.0

Nested Class Summary
static class PopularIssueTypesUtil.PopularIssueTypesHolder
           
 
Method Summary
 List<IssueType> getOtherIssueTypesForProject(Project project, com.atlassian.crowd.embedded.api.User user)
          Returns the set difference between all available issue types for a project, and the popular issue types for a project/user context.
 PopularIssueTypesUtil.PopularIssueTypesHolder getPopularAndOtherIssueTypesForProject(Project project, com.atlassian.crowd.embedded.api.User user)
          Returns a holder that contains both - popular and other issue Types.
 List<IssueType> getPopularIssueTypesForProject(Project project, com.atlassian.crowd.embedded.api.User user)
          Returns the most popular non-subtask issue types used for issue creation in the specified project and by the specified user, within a designated time frame.
 

Method Detail

getPopularIssueTypesForProject

List<IssueType> getPopularIssueTypesForProject(Project project,
                                               com.atlassian.crowd.embedded.api.User user)
Returns the most popular non-subtask issue types used for issue creation in the specified project and by the specified user, within a designated time frame. If the user is not specified, or has not created any issues in that time frame, this method returns the most popular issue types for the entire project. The number of issue types returned by this method is hard-coded in the implementation. If the number of popular issue types available is less than that, the remainder of the list will be filled out with any available issue types from the project, in the order of which they are defined in the issue type scheme.

Parameters:
project - the project to query
user - the reporter to query; use null if the reporter is not important
Returns:
the list of popular issue types, limited to a hard-coded number; never null.

getOtherIssueTypesForProject

List<IssueType> getOtherIssueTypesForProject(Project project,
                                             com.atlassian.crowd.embedded.api.User user)
Returns the set difference between all available issue types for a project, and the popular issue types for a project/user context.

Parameters:
project - the project to query
user - the reporter to query; use null if the reporter is not important
Returns:
the rest of the issue types; never null.

getPopularAndOtherIssueTypesForProject

PopularIssueTypesUtil.PopularIssueTypesHolder getPopularAndOtherIssueTypesForProject(Project project,
                                                                                     com.atlassian.crowd.embedded.api.User user)
Returns a holder that contains both - popular and other issue Types. It is basically the conglomerate result of: getPopularIssueTypesForProject(com.atlassian.jira.project.Project, User) And getOtherIssueTypesForProject(com.atlassian.jira.project.Project, User) This is more performant than the two seperate calls.

Parameters:
project - the project to query
user - the reporter to query; use null if the reporter is not important
Returns:
a list of popular issue types and a list of other issues (with popular removed)


Copyright © 2002-2012 Atlassian. All Rights Reserved.