Breadcrumbs

Completion percentage by status

📚

Return the completion percentage of a work item based on the status it is in.

Configuration

Create a Custom smart number field and use the General parsing mode.

Expression

%{%{issue.status} = "Open" ? 0 : 
( %{issue.status} = "Planning" ? 15 : 
( %{issue.status} = "In Progress" ? 60 : 
( %{issue.status} = "In Review" ? 70 : 
( %{issue.status} = "Implementing" ? 85 : 100 ))))}

Please, replace the status names as well as the completion percentages with the ones of your choice. Any status not included in the sequence will return 1.

Display as

Number

Formatting style

Custom format

Pattern

###.##%

Details

1. What does the expression do?

This expression calculates and returns the completion percentage of a Jira work item based on its current status. Each status is mapped to a specific percentage value, representing how far along the work item is in its lifecycle.

2. Step-by-step breakdown

Let’s break it down:

  • %{issue.status}: This retrieves the current status of the work item (e.g., "Open", "Planning", etc.).

  • The ? and : symbols are used for conditional logic (similar to "if-else" statements).

  • The expression checks the status in a specific order:

    1. If the status is "Open", return 0 (0% complete).

    2. If the status is "Planning", return 15 (15% complete).

    3. If the status is "In Progress", return 60 (60% complete).

    4. If the status is "In Review", return 70 (70% complete).

    5. If the status is "Implementing", return 85 (85% complete).

    6. For any other status, return 100 (100% complete).

  • The nested structure means each condition is checked in order until one matches.

3. Examples

  • If an work item’s status is "Open", the field will show 0% completion.

  • If the status is "Planning", it will show 15% completion.

  • If the status is "In Progress", it will show 60% completion.

  • If the status is "In Review", it will show 70% completion.

  • If the status is "Implementing", it will show 85% completion.

  • If the status is anything else (e.g., "Done", "Closed"), it will show 100% completion.

4. Real-life use cases

  • Progress Tracking: You can use this field in Jira dashboards or reports to visualize how much work is completed based on the status.

  • Custom Workflows: If your team uses custom statuses, you can adjust the expression to match your workflow and assign appropriate percentages to each status.

  • Performance Metrics: Managers can quickly see the overall progress of multiple work items or projects by aggregating these percentages.