Project Estimation using a grid

The Project Estimation use case help user to create default rows in a grid to list the project phases, especially for organization who want to estimate projects phases using Table Grid app, with any kind of Project Management methodology (Agile or others) and also familiar with using Jira.

You will also learn how to use several features in TGNG app such as:

 

Introduction

The Project Estimation use case help user to create default rows in a grid to list the project phases, especially for organization who want to estimate projects phases using Table Grid app, with any kind of Project Management methodology (Agile or others ) and also familiar with using Jira.

The total estimation can then be copied to Time Tracking field (Original Estimate field) in Jira using Java APIs.

Prerequisites

  • User logged into their account, installed Table Grid Next Generation Server / Datacenter app

  • User created a related Jira project

  • User had the admin role on Jira 

Post-condition

  • User can use the grid to update related information for the list of items

  • User can create issues using the Project Estimate grid

  • User can download/upload the Configuration for personal usage

  • User can add more columns or default rows to support the project estimation such as: Stakeholders, DateTime,…  

Conditions

  • Required fields are marked with a red asterisk *

  • The grid must contain at least one column

  • The grid can be displayed in more than one project

  • User can download/upload the config for future usage in other project/issues.

  • When adding new columns or save the configuration, user need to reindex JIRA in order to changes to take effect.

  • When clicking the box Cell value required, user need to fill the information in the cell.

Flow chart diagram

Creating Project Estimation configuration

Basic Flow

Step

Action

1

Navigate to Jira Administration by clicking button 

2

Click Manage Apps, in Table Grid section choose Grids 

3

In Grid Fields, click Add Grid button to add new grid

4

Fill information for “Name” and “Description” 

In this example, writer used

  • Name = “Project Estimate

  • Description = “Project Estimate use case

image-20240108-080440.png

5

In Configuration - Column, click Add new column to create new column

6

In Add Column, choose Sequence in Column type

7

User fill information for Identifier and Title

In this example, writer used “jno“ as Identifier and type “No.” as column Title

image-20240108-080329.png

 

9

Click Add to save the information 

10

Click Add new column to create new column

11

In Add Column, choose String in Column type

12

User fill information for Identifier and Title

Type “jphase“ as Identifier and type “Project Phase” as Title

Tick the box Cell value required to make sure default value to be used in each cell of column.

13

Click Add to save the information 

14

In Add Column, choose Number in Column type

15

User fill information for Identifier and Title

In this example, writer typed “jestimate“ as Identifier and type “Estimation (in hours)” as Title

Tick the box Cell value required to make sure default value to be used in each cell of column.

In Aggregation operation, click button to choose sum option which calculate the sum of the column.

16

Click Add to save the column information 

17

In Add Column, choose String  in Column type

Type “jnote” as Identifier and Type the “Notes” as column Title

18

Click Add to save the information 

19

User click Save button to save the columns information

20

Based on your individual purpose, you can fill information for each column by double click the cell.

For example, writer used: “Planning, Specification, Design, Development, Test, Review, Release and Documentation” for Project Phase column.

Click Save button to save the config.

21

Click Create project, choose Name and Key

Within the chosen Software Project, type Jira Project = PRJESTIMATE, project key = PRJESTIMAT

Click Submit button to save the project setting information.

22

In Issues, click Screens and click Configure with the chosen screen.

In Configure Screen, go to the bottom of page and type the name of your grid field

In this example, writer add “Project Estimate” grid in the Screen

23

Click Add button to add the grid field on all needed screens.

User can download this config:

Alternative Flow

Step

Description

1a

In Issues, choose Custom Fields in Fields,

1a1

Click Add Custom Field button

 

1a2

Click Grid then Next to process next part

 

1a3

Fill Name and Description

In this example, writer use “Project Estimation” for both Name and Description

Click Next to process next part

1a4

In Configure context, choose Select projects

In this example, writer use Project Estimation (PE)

Click Create button to save configuration

1a5

Associate field Project Estimation to screens by click the box under Select

In this example, writer chose “PE: Scrum Bug Screen” and “PE: Scrum Default Issue Screen

 

Click Update button to save the information

1a6

User can see their grid in Custom fields

 

1a7

User click Manage AppsGrids

In Grid Fields, user can see their grid and click button to edit information

 

Use case continues in step 5

Exceptional Flow

Users delete all columns

Continued from step #9 in the Basic Flow:

Step

Description

10

The system shows a pop-up message: “Grid name is required. Please set the name of your Grid., table-config-column-config-required

Use case stops. 

 

Users click “Cancel” when saving the config

Continued from step #24 in the Basic Flow:

Step

Description

25

The system shows a pop-up message: “Exit without saving?”

26

User click Yes button

Use case stops. 

Use the Project Estimation grid in a Jira Project

Create a new project

  1. In the main bar, click Projects → click Create project

  1. Choose a project type → Click Next button to process the next step

  1. The system display a pop-up message describes the issue types and workflow of the software development method.

Click Select button to process next step

  1. Type Name and Key of the project

In this example, writer typed “PRJESTIMATE” for Name and “PRJESTIMAT” for Key

Click Submit button to create new project

Your project can be found in the list of projects.

Grid configuration file

To go faster you can import this grid configuration =

 

Add grid on project screens

  1. In Issues, click Screens and click Configure with the chosen screen.

In the example, writer configured the PE: Scrum Default Issue Screen

Please visit here for more detailed information: How to define a screen for a custom field

  1. In Field Tab, choose grid to apply to your project by clicking button

In the example, writer added Project Estimate grid in the Field Tab

Click Add button to save the information

  1. User choose a project in Projects section

Writer choose PRJESTIMATE (PRJESTIMAT) project to process next step

  1. In the selected project, user click Create button to create new Issue

Then select Issue Type, and select a name for Summary

In this example, writer use “PRJ1” for Summary

 

Click Create button to save the issue.

Final result on issue view

  1. The final result will look like this

User can continue to edit the config in the issue by clicking the button and add more rows in the issue by clicking the button

Click to save any changes or click to cancel it.

 

Going further using TGNG Java APIs

After estimation being done using the grid, we can copy the project estimation total column from the Project Estimation grid to Original Estimate field in Jira Time Tracking feature.
You will need to use an external app like Scriptrunner for scripting in Jira to be able to use TGNG Java APIs.

This script can be used during a transition workflow once the estimation of all phases are done.
You can use the Custom script post-function feature from Scriptrunner app: https://docs.adaptavist.com/sr4js/latest/features/workflows/post-functions/custom-post-functions

import com.atlassian.crowd.embedded.api.User; import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.CustomFieldManager; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.jira.security.JiraAuthenticationContext; import com.atlassian.plugin.PluginAccessor; import com.atlassian.jira.user.ApplicationUser; import com.idalko.tgng.jira.server.api.*; // get an issue String tgngCustomFieldName = "Project Estimate"; //Change the grid custom field name to relevant one String columnIdToSum = "jestimate"; //Change the column ID to the relevant one // get TGNG custom field CustomFieldManager customFieldManager = ComponentAccessor.getOSGiComponentInstanceOfType(CustomFieldManager.class); CustomField tgngCustomField = customFieldManager.getCustomFieldObjectsByName(tgngCustomFieldName).get(0); Long tgngCustomFieldId = tgngCustomField.getIdAsLong(); if (tgngCustomField){ ApplicationUser applicationUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(); // read grid data PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor(); Class apiServiceClass = pluginAccessor.getClassLoader().findClass("com.idalko.tgng.jira.server.api.GridService"); def gridFieldData = ComponentAccessor.getOSGiComponentInstanceOfType(apiServiceClass); def callResult = null; try { callResult = gridFieldData.readFieldData(issue.getId(), tgngCustomFieldId, applicationUser, null); log.warn("callResult= " +callResult) } catch (Exception e) { log.error(e.getMessage()) } def gridRows = callResult.getRows(); Long sum = 0; for (row in gridRows) { def column = row.getColumns().get(columnIdToSum); sum += column.longValue(); } Long sumh = sum*60*60; //from millisecond to hour log.warn("sumh= "+sumh) issue.setEstimate(sumh) //remaining issue.setOriginalEstimate(sumh) //original estimate }

After using a transition called “Estimated”, here is the result: the original estimate field in Jira is updated with the total from the estimation column in the grid.