Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,475
Community Members
 
Community Events
184
Community Groups

Is it possible to use both historical value and an if statement in a Structure formula?

Hi everyone,

Relatively new to structure, I'm trying to pick up the historical value of a rag status, say a week ago and then display as a coloured panel.

I've had success with both using historical value and coloured panels separately, but when combined it seems to ignore the historical value.

Would anyone be able to advise whether this is possible or where I may be going wrong please?

Formula:

RAG formula in structure.PNG

 

Expected output: 

 

Expected Output.PNG

1 answer

1 accepted

1 vote
Answer accepted
David Niro _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 29, 2022

Hello @Jared ,

David from ALM Works here.  Welcome to the Community!

Combining the historical value and the wiki formatting is definitely possible.  I've provided one of the methods below. 

WITH HV_OR = 
IF Issuetype = "Assurance":
historical_value(this,"overallRAGStatus",DATE_SUBTRACT(Now(),7,"day"))
:

WITH FORMAT_CAPTION(value,background)=
"""{panel:bgColor=$background}*$value*{panel}"""
:

IF HV_OR = "Red":
FORMAT_CAPTION("R","#FF0000")
ELSE IF HV_OR = "Amber":
FORMAT_CAPTION("A","#FFBF00")
ELSE IF HV_OR = "Green":
FORMAT_CAPTION("G","#00FF00")

I've created a local variable using WITH HV_OR to identify the historical value of the field (with your parameters) if the issuetype is "Assurance".  

The FORMAT_CAPTION is a user expression that will allow us to quickly format the text and color for the main portion of the formula.

The main formula just compares the HV_OR value against Red, Amber and Green and then assigns the text and color you defined.

Please let me know if it helps, or if there are any adjustments needed.  Look forward to your feedback.

Best Regards,
David

That works perfectly, thanks very much @David Niro _Tempo_

I'm still familiarising myself with the Expr syntax so it's good to see a working example. 

Like David Niro _Tempo_ likes this
David Niro _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 30, 2022

You're very welcome!  Glad to hear it helped!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events