Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Build Plan for a CO₂e badge per issue

A small signal can change behavior.

This micro badge shows “🌱 3 mg CO₂e saved” right in your issue view. You can use the same for other badges or calculate values.

Screenshot 2025-09-20 090715.png

It’s intentionally heuristic, not a lifecycle calculation. The point is to demonstrate how to use Jira Automation and a “graphic‑style” text field to surface a simple, catchy metric with built‑in features.

 

What you’ll build

  • 2 fields: a number to store the value, and a short text “badge” for display with emoji for a graphic look.
  • 1 automation rule that calculates and writes the badge.

Demo formula

  • Proxy points from estimate hours: points=⌈max⁡(estimate_hours,1)/4⌉points=⌈max(estimate_hours,1)/4⌉
  • Core heuristic: CO2emg=round(2.4⋅points+0.8)CO2​emg​=round(2.4⋅points+0.8)
  • Priority boost: if priority is High or Highest, multiply by 1.21.2 and round again.

 

Implementation note: estimate_hours is taken from Original estimate (converted from seconds to hours). I do not use Story Points and we ignore Remaining estimate for determinism.

 

Build plan

  1. Create two custom fields
  • Number: “CO₂e saved (mg)”

Screenshot 2025-09-20 093236.png

  • Paragraph: “Eco Badge”

Screenshot 2025-09-20 093248.pngWrite down the customfield_xxxx id from CO₂e saved (mg)”. In my case customfield_11660.

 

  1. Place the badge prominently

Bild1.png

  • Keep “CO₂e saved (mg)” in the details pane or what you want.

Bild2.png

 

Add the automation rule

Trigger

  • Work item transitioned → To: Resolved, Completed ( depends on your instance )

Bild3.png

Actions

  • Create variable → sec
    {{#=}}{{issue.timetracking.originalEstimateSeconds}}+0{{/}}

Bild4.png

  • Create variable → hours
    {{#=}}max({{sec}}/3600, 1){{/}}

Bild5.png

 

  • Create variable → points (ceiling emulated for positive numbers)
    {{#=}}round({{hours}}/4 + 0.499999, 0){{/}}

Bild6.png

  • Create variable → basemg
    {{#=}}round( 2.4*{{points}} + 0.8 , 0 ){{/}}

Bild7.png

 


The block with create variable and some logging .

Bild8.png

  • IF Priority in (High, Highest)

Bild9.png


THEN Edit work item → CO₂e saved (mg)
{{#=}}round( {{basemg}} * 1.2 , 0 ){{/}}

Bild10.png


ELSE Edit work item → CO₂e saved (mg)
{{basemg}}

Bild11.png

  • Refetch
  • Edit work item → Eco Badge
    🌱 {{issue."CO₂e saved (mg)"}} mg CO₂e saved

Bild12.png

Examples

  • 4 h, Medium → points=⌈4/4⌉=1points=⌈4/4⌉=1 → CO2emg=round(2.4⋅1+0.8)=3CO2​emg​=round(2.4⋅1+0.8)=3

Bild13.png

 

  • 9 h, High → points=⌈9/4⌉=3points=⌈9/4⌉=3 → base =8=8 → boost =round(8⋅1.2)=10=round(8⋅1.2)=10

Bild14.png

  • 0 h (missing), Medium → floor to points=1points=1 → =3=3 mg

 Bild15.png

For a real‑world indicator, you’d need much richer, verifiable data beyond a simple heuristic: asset inventories and configurations (JSM Assets/CMDB), deployment and runtime telemetry (CI/CD and monitoring), cloud and data center energy mix and usage, baseline and counterfactual assumptions, embodied emissions of hardware and services, and governance rules for scopes and boundaries (e.g., which activities are in scope, measurement periods, and data quality grades). In practice, that means fetching and reconciling records from Assets and other authoritative sources (billing exports, provider APIs, data warehouses) and documenting the calculation method so the badge reflects traceable, auditable inputs rather than a minimalist demo.

Have fun to play around .

 

Sources

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events