Forums

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

Structure how to count number of changes to a field

Mauro Bennici
November 10, 2023

greetings, 

I am using history on structure, and I am trying to count the occurrences of a field's history but I get some issues. 

using a simple 

history.changes
.FILTER($.field = "Status")

I get all the status changes in the field: 

Status -> to do, Status -> in progress etc.

I need to count the number of changes, but if I simply wrap the formula in a COUNT it gives weird results (i.e. 3 status changes but the count says 10).

How can I fix it? 

thanks

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Valerie Knapp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 10, 2023

Hi @Mauro Bennici , thanks for your question.

You can also reach out directly to the vendor of Structure, who should be experts on how the product works - Structure by Tempo - Jira Portfolio Management & PPM | Atlassian Marketplace

Hope this helps.

Cheers

Stepan
Community Champion
November 10, 2023

Hello @Mauro Bennici 

The COUNT aggregate function indeed won't work here - such functions can only aggregate data from multiple items in the structure - e.g. counting the number of or the sum of Story Points of all child issues etc.

In your case, you need to count the number of transitions in a single issue in the same field. This formula should do it:

history.changes.FILTER($.field = "Status").size()

I hope this helps. If you need further assistance, please reach out to us directly at our support portal.

Best regards,
Stepan Kholodov
Tempo (The Structure app vendor)

Like # people like this
Mauro Bennici
November 10, 2023

thanks! It works!

Like # people like this
Saurabh Kejriwal
July 18, 2024

Works like a charm. many thanks Stepan and Mauro

Like # people like this
1 vote
Veronica Ibragimova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 13, 2024

How can I use this Formula if I want to take into account changes only when the issue was in specific statuses? 

 

Stepan
Community Champion
June 13, 2024

@Veronica Ibragimova 

You can count only specific transitions with a formula like this:

history.changes.FILTER($.field = "Status" and $.to = "status name").size()

If you have more questions about formulas or Structure in general, please reach out to us directly at our portal.

Best regards,
Stepan

Like # people like this
0 votes
Nicole Walsh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2026

How would you show the date of the specific status that an issue was updated to? The formula below doesn't show any errors. However, the column is blank once rendered. 

 

Values{ history.changes.FILTER($.field = "Status" and $.to = "Approved").MAP($.date) }

Stepan
Community Champion
July 7, 2026

@Nicole Walsh hi, the formula should be:

values{history.changes.FILTER($.field = "Status" and $.to = "Approved").changegroup.time}

Best regards,
Stepan

Like John Funk likes this
TAGS
AUG Leaders

Atlassian Community Events