Forums

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

Field value changed in structure board

Leo Nishanth Anthony
Contributor
March 15, 2022

Hello Experts, 

 

I am using this MAX#subtree{fixversion.releasedate} to arrive at a release version date for my user-story based on the sub-tasks and linked tasks latest release dates. 

I would also like to use wiki markup to highlight if a fixversion has been updated since last sprint, how can i write a formula to arrive at this ?

this is the closest link - https://community.atlassian.com/t5/Jira-questions/How-do-I-build-a-report-to-show-how-long-an-item-has-been/qaq-p/1724722 but am not really not able to arrive at the right formula

1 answer

1 accepted

3 votes
Answer accepted
Aleksandr Kliuchnikov _Tempo_
Atlassian Partner
March 17, 2022

Hi Leo!

You can achieve this with following formula:

IF history.changes
.FILTER($.field = "fixversions")
.LAST()
.changeGroup.timestamp > sprint.last().startDate:
"{panel:bgColor=#DC143C}Updated{panel}"

It will highlight the items which FixVersions have been updated after the sprint they are in had started. 

Hope this helps. If you want to discuss history functions in details or any other formula related topics you can always contact us directly through our support channel.

Best regards,
Aleksandr Kliuchnikov
ALM Works

Leo Nishanth Anthony
Contributor
March 19, 2022

Dear Aleksandr Kliuchnikov, 

Thank you for the reply, i changed the formula to mention the selection of time period rather than only last spint, 


with start=make_date(2021,01,01):
with finish=today():
with fixversions_set=history.filter($.time > start and $.time < finish and $.changes.any($.field = "fixversions")).time.last():
days_between(fixversions_set, today())

i also want to use the also highlight using the wiki markup if i am bit confused what should be the variable to use following your above example based on number of times it changes 
"{panel:bgColor=#DC143C}variable{panel}"

Like Dave Rosenlund _Trundl_ likes this
Aleksandr Kliuchnikov _Tempo_
Atlassian Partner
March 21, 2022

Hi Leo!

Those two formulas have a bit different approach and produce different output results. The one that I wrote checks for changes of a specific field after some event (sprint Start Date) and the output is either true or false (field either changed or not). If it is true, the wiki markup condition is executed. This condition

"{panel:bgColor=#DC143C}Updated{panel}"

adds colored background panel around text (“Upgraded” in my case).

Formula you wrote find dates when changes in a specific field occurred within set dates interval (between 2021/12/20 and today), then gets the last change date and as output gives you a number of days between when this change has happened and today. You can add a wiki markup to the result as well by adding following lines:

with start=make_date(2021,01,01):
with finish=today():
with fixversions_set=history.filter($.time > start and $.time < finish and $.changes.any($.field = "fixversions")).time.last():

WITH add_background(value, color) =
"""{panel:bgColor=$color|borderWidth=0px}$value{panel}""":
add_background(days_between(fixversions_set, finish), #DC143C")

 I used hexadecimal color code, but it’s also possible to use color words (“red”, “green”, etc.) instead.

 Please let me know if you have any other questions.

 

BR,

Aleksandr Kliuchnikov

ALM Works

Like # people like this

Suggest an answer

Log in or Sign up to answer