Description
Returns the number of issue with type Bug, Blocker priority and in QA Status in the current project
Configuration
1. Create a Projectrak Script field called "Blocking Bugs in QA"
2. Insert the following Groovy script and modify accordingly to your instance:
Info |
---|
Priority: Line 20 in the script. In the example we are using Blocker. Please use the status the would represent that phase in your instance. Status: Line 21 in the script. In this example we are using QA. Please use the status the would represent that phase in your instance. |
Groovy Script
...
...
blocking-bugs-in-qa.groovy
Code Block | ||
---|---|---|
| ||
package deiser.profields.scripts import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.jql.builder.JqlQueryBuilder import com.atlassian.jira.web.bean.PagerFilter // Components def searchService = ComponentAccessor.getOSGiComponentInstanceOfType(SearchService.class) def jiraAuthenticationContext = ComponentAccessor.jiraAuthenticationContext // Script variables def loggedInUser = jiraAuthenticationContext.getLoggedInUser() // Make JQL query def query = JqlQueryBuilder.newBuilder() .where() .project(project.id).and() .priority("Blocker").and() .status("QA") .buildQuery() // Returns the issue count return searchService.search(loggedInUser, query, PagerFilter.unlimitedFilter).results.size() |
3. Configure the project's layout including "Blocking Bugs in QA"
4. Associate the layout to the Software project you need this information to be applied to.
...