Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The company's Atlassian Application Manager asks an Atlassian Consultant for some advice. Helped by Projectrak, Atlassian Consultant creates a Layout for every Project Leader in order for them to categorize their projects in four different types: Product Development, Support and two more.

Layout

...

Source data

Store the information available when the project was requested. Example:

...

Code Block
languagegroovy
import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.jql.builder.JqlQueryBuilder
import com.atlassian.jira.web.bean.PagerFilter
import java.text.SimpleDateFormat
def searchService = ComponentAccessor.getOSGiComponentInstanceOfType(SearchService.class)
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
def lastUpdatedDate = new Date(Long.MIN_VALUE)
def builder = JqlQueryBuilder.newBuilder()
builder.where().project(project.id)
def query = builder.buildQuery()
def results = searchService.search(user, query, PagerFilter.getUnlimitedFilter())
if (results.getTotal() == 0) {
    return ""
}
else {
    def i = 0
    for (Issue issue : results.getResults())
    {
        def lastUpdated = issue.getUpdated()
        if (i == 0 || lastUpdated > lastUpdatedDate)
            lastUpdatedDate = lastUpdated
        i++
    }
    return new SimpleDateFormat("dd/MMM/yy").format(lastUpdatedDate)
}


Total issues

Code Block
languagegroovy
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager

return ComponentAccessor.issueManager.getIssueCountForProject(project.id)

...

Use Script Fields that will help with the Homogenization of the Company's Way of Work when added as Projectrak Script fields.

Issue Type Scheme: Fetches the Project Issue Scheme name

Code Block
languagegroovy
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManager

def issueTypeSchemeManager = ComponentAccessor.getOSGiComponentInstanceOfType(IssueTypeSchemeManager.class)
def scheme = issueTypeSchemeManager.getConfigScheme(project)
return scheme != null ? scheme.name : "Empty"

Priority Scheme: Fetches the Project Issue Priority Scheme name

Code Block
languagegroovy
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.config.manager.PrioritySchemeManager
import com.atlassian.jira.issue.fields.config.FieldConfigScheme

def prioritySchemeManager = ComponentAccessor.getOSGiComponentInstanceOfType(PrioritySchemeManager.class)
def priorityScheme = prioritySchemeManager.getScheme(project)
return priorityScheme != null ? priorityScheme.name : "Empty"

Screen Scheme: Fetches the Project Issue Screen Scheme name

Code Block
languagegroovy
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.screen.issuetype.IssueTypeScreenSchemeManager
import com.atlassian.jira.issue.fields.screen.issuetype.IssueTypeScreenScheme

def issueTypeScreenSchemeManager = ComponentAccessor.getOSGiComponentInstanceOfType(IssueTypeScreenSchemeManager.class)
def scheme = issueTypeScreenSchemeManager.getIssueTypeScreenScheme(project)
return scheme != null ? scheme.name : "Empty"

Workflow scheme: Fetches the Project Issue Workflow Scheme name

Code Block
languagegroovy
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.workflow.WorkflowSchemeManager

def workflowServiceManager = ComponentAccessor.getOSGiComponentInstanceOfType(WorkflowSchemeManager.class)
def workflow = workflowServiceManager.getWorkflowSchemeObj(project)
return (workflow != null) ? workflow.getName() : "Empty" 

Dashboard

Use Jira dashboards to get a better understanding of the instance How are the schemas distributed?
Image Modified

Or identify which projects do not have a reporter, even which user requests the most projects:

...

Once all the information is gathered and referring to the created Dashboard, the Atlassian Application Manager meets with everyone involved in order to explain the necessity in having the Atlassian Consultant be the link that gathers the necessities which will help an agreed-upon and common implementation of the new Way of Working in Jira, and at the same time start the moving process to this four types of standard projects to those teams that are not currently using them.