Class StatusService
java.lang.Object
com.codebarrel.automation.rulecomponent.jira.service.StatusService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDoneOrFirstDoneStatusFromCategory
(TenantActor tenantActor) Get the status called "Done" if it exists.getFirstStatusFromCategory
(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey) Get the first status (by ID) from the statuses matching the given category keygetFirstStatusFromCategory
(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId) Get the first status (by ID) from the statuses matching the given category key available in the given projectgetStatusById
(TenantActor tenantActor, Long statusId) getStatusesFromCategory
(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey) Get a list of statuses matching the given category key from the global setgetStatusesFromCategory
(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId) Get a list of statuses matching the given category key that are available in the given projectgetStatusForProjectByName
(TenantActor tenantActor, Long projectId, StatusBean.StatusCategory.Key statusCategory, String statusName)
-
Constructor Details
-
StatusService
-
-
Method Details
-
getStatusesFromCategory
public Set<StatusBean> getStatusesFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey) Get a list of statuses matching the given category key from the global set- Parameters:
statusCategoryKey
- One of NEW, DONE, INDETERMINATE, UNDEFINED- Returns:
- A list of StatusBeans that conform to the given category
-
getStatusesFromCategory
public Set<StatusBean> getStatusesFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId) Get a list of statuses matching the given category key that are available in the given project- Parameters:
statusCategoryKey
- One of NEW, DONE, INDETERMINATE, UNDEFINEDprojectId
- ID of the project to get statuses from- Returns:
- A list of StatusBeans that conform to the given category
-
getStatusForProjectByName
public Optional<StatusBean> getStatusForProjectByName(TenantActor tenantActor, Long projectId, StatusBean.StatusCategory.Key statusCategory, String statusName) -
getFirstStatusFromCategory
public Optional<StatusBean> getFirstStatusFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey) Get the first status (by ID) from the statuses matching the given category key- Parameters:
statusCategoryKey
- One of NEW, DONE, INDETERMINATE, UNDEFINED- Returns:
- An optional StatusBean conforming to the given category
-
getFirstStatusFromCategory
public Optional<StatusBean> getFirstStatusFromCategory(TenantActor tenantActor, StatusBean.StatusCategory.Key statusCategoryKey, Long projectId) Get the first status (by ID) from the statuses matching the given category key available in the given project- Parameters:
statusCategoryKey
- One of NEW, DONE, INDETERMINATE, UNDEFINED- Returns:
- An optional StatusBean conforming to the given category
-
getDoneOrFirstDoneStatusFromCategory
Get the status called "Done" if it exists. Otherwise just grab the first one in that category. This is useful in global sample rules as it has the tendency to pick strange resolutions...- Returns:
- An optional StatusBean conforming to the given category
-
getStatusById
-