Document toolboxDocument toolbox

Tracking support packs projects

Title

Tracking of the Service Team support packs

Description

Project managers and leads need to have all the information regarding the Support Packs the service team has a contract with. The hours they have the contract for, how many hours they have spent, if the support pack has expired, the cost of everything, etc. This use case will give you the power of tracking all your projects and being able to create a complete report of your support packs. 

Objective

Tracking support packs projects

Audience

  • Service managers

  • Project managers

  • Project leads

  • Finance roles

What is a Jira Project?

Every company with which we have a support pack contracted

Key Data

Time tracking and Status 

Focus

Tracking and reporting

Layout

This is an example of what the layout might look like:

Fields

Here are some fields that you can use in this use case:

Field

Type

Details

Field

Type

Details

Name

Jira property

Project name

Support pack status

Status

The current status of the service

Principal agent

User picker

The agent responsible for the service

Expired

Script

Calculates service status according to date

Replace EXPIRATION_DATE_FIELD_ID. It is the Identifier of the date type field that stores the expiry date.

import com.atlassian.jira.component.ComponentAccessor import com.deiser.jira.profields.api.field.date.DateField import com.deiser.jira.profields.api.field.FieldService import com.deiser.jira.profields.api.value.ValueService def EXPIRATION_DATE_FIELD_ID = 33 Calendar getCalendarWithoutTime(Date date) { Calendar calendar = new GregorianCalendar() calendar.setTime(date) calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0) calendar.set(Calendar.MILLISECOND, 0) return calendar; } def fieldService = ComponentAccessor.getOSGiComponentInstanceOfType(FieldService.class) def valueService = ComponentAccessor.getOSGiComponentInstanceOfType(ValueService.class) def expirationDateField = fieldService.get(EXPIRATION_DATE_FIELD_ID) def expirationDate = valueService.getValue(project, (DateField)expirationDateField) if (expirationDate == null) { return false } Calendar expired = getCalendarWithoutTime(expirationDate) Calendar actual = getCalendarWithoutTime(new Date()) return actual.compareTo(expired)>0



Country

Select list

Country where the service is performed

Comments

Text field multiple line

Last comments

Support Pack Size 

Original estimate

Hours contracted for the service

Total time spent

Cumulative

Total hours logged in the service

Total Remaining Estimate 

Script

Calculates Support Pack Size - Total time spent



 Replace PACK_SIZE

 Replace TIME_SPENT 

import com.atlassian.jira.component.ComponentAccessor import com.deiser.jira.profields.api.field.duration.DurationField import com.deiser.jira.profields.api.field.cumulative.CumulativeField import com.deiser.jira.profields.api.value.ValueService def PACK_SIZE = 22 def TIME_SPENT = 82 def valueService = ComponentAccessor.getOSGiComponentInstanceOfType(ValueService.class) def packSizeValue = valueService.getValue(project, (DurationField)fieldService.get(PACK_SIZE)) def timeSpentValue = valueService.getValue(project, (CumulativeField)fieldService.get(TIME_SPENT)) String format (seconds){ return "${((seconds/3600)*10)/10}h" } if (packSizeValue == null) { return format(0) } if (timeSpentValue == null) { return format(packSizeValue) } return format(packSizeValue - timeSpentValue)



Last activity 

Script

Calculates the last activity of the issues

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) }



Support Pack Activation Date 

Date

Date on which service is to begin

Support Pack Expiration Date 

Date

Date on which service expires

Proposal Data 

Text field

Link to service documentation

Customer Main Contact 

User picker

Primary customer contact (non-technical)

Customer Technical Contact 

User picker

Customer's main technical contact

Supported Products 

Select list

List of products for which the customer can request support

Applicable SLA 

Select list

Type of service level agreement

Dashboard

And finally you can have a dashboard with different gadgets to keep track of your services:

  1. Services by agents

  2. Track the estimate for each service

  3.  SLA by product

  4. Where services are provided