Scenario
We'll show you how to do all of this using Power Scripts™ for Jira - a powerful scripting tool to help automate your Jira.
What This Script Does
Whenever an issue within the project is created, edited, or a worklog is generated, this script runs.
It sums all the estimated hours on all issues in the project, sums all the logged work hours on all issues in the project, calculates the project percentage complete (in terms of hours), and then adds a human-readable comment to a "master tracker" issue with the latest data.
e.g. "This project has *200h* estimated work with *120h* spent for a total of *80h* remaining. It is *60%* complete."
It can easily be modified to populate custom fields instead of generating a comment. This has now been reflected in the example script.
Prerequisites
You have Jira Core, Software, or Service Desk installed
You have Power Scripts™ for Jira installed
You have created four custom fields of type "interval" and mapped those custom field IDs to the following aliases in the sil.aliases file:
projectTotalTimeEstimated
projectTotalWorkLogged
projectTotalTimeRemaining
projectPercentComplete
Modifications Required
Modify the script to reference a single project to calculate totals
Modify the script to reference a single issue to append comments to
Configuration
Trigger this script on the following system events:
Issue Created
Issue Edited
Work Logged on Issue