Hello!
In the IF statement below, i want to add also flag= "Red", when the condition is True:
with FORMAT_CAPTION(color, caption) = (
""":panel[$Caption]{backgroundColor=$color color=white}"""
):
with redChildren = COUNT#children{IF(flag = "Red", key)}:
IF status = "done":
FORMAT_CAPTION("#36c", ":sunny: **Completed**")
ELSE IF (level = 1 or level = 2) and redChildren > 0:
FORMAT_CAPTION("#d33", ":cloud_with_lightning_and_rain: **At Risk **")
Can i write:
FORMAT_CAPTION("#d33", ":cloud_with_lightning_and_rain: **At Risk **", flag="Red")
OR
FORMAT_CAPTION("#d33", ":cloud_with_lightning_and_rain: **At Risk **") and flag= "Red"
Hello @Shira Hanan ,
David from ALM Works here. Welcome to the Community!
Could you please provide some more detail about what the "Flag" is and where it is coming from? If you are looking to add a red flag to the end of the caption, you can do so with the formatting below.
FORMAT_CAPTION("#d33", ":cloud_with_lightning_and_rain:
**At Risk **
:triangular_flag_on_post:"
)
However, it seems it may not be as simple as this, because I see you are also using Flag as a variable in your redChildren expression.
Looking forward to your feedback.
Best Regards,
David
hi David and thank you for your answer,
Flag is a field i have on all issue types in the Structure. it's populated by Automation and getting Red/ Yellow/ Green text according to a set of conditions.
i'm using it in the structure when creating the local variable :
redChildren = COUNT#children{IF(flag = "Red", key)}:
and also in
yellowChildren = COUNT#children{IF(flag = "Yellow", key)}:
for the parent epic to indicate if one of its children has red or yellow alerts.
i also want to populate it here for the Epic in a certain condition that i copied in the original massage. is that possible?
let me know if any further details are required here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Shira Hanan ,
You are very welcome! Thank you for the additional information.
Just to make sure I understood, the goal is to have the value from the Flag field included in the formula's return result?
If I have understood correctly, something like this should be close:
with FORMAT_CAPTION(color, caption, Flag) = (
""":panel[$Caption $Flag]{backgroundColor=$color color=white}"""
):
FORMAT_CAPTION("#59B161", ":sunny: **Awesome**",Flag)
I highlight the adjustments I made to the example formula from our Markdown in Formula Columns wiki document.
Essentially, Flag will need to be part of the Format_Caption local variable in order for it to be included in the Format_Caption references in the rest of the formula.
Also, you will need to map "Flag" to your custom field. It may not be recognized automatically.
Please let me know if this helps!
Best Regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks David, this is getting Really close to what I'm Trying to get!
the difference is , i want to set value (color) into the Flag field (flag = "Green"/"Yellow"/"Red") and not present it in the caption, in order to use this color and calculate something for the Epic/Initiative above it (Parent).
for example:
IF status = "done":
FORMAT_CAPTION("#36c", ":sunny: **Completed**",flag = "Green")
gives me a massage with the text/Image and background but also a number (0/1) for the flag field, which I'm not interested of.
i guess the change should come here:
with FORMAT_CAPTION(color, caption, Flag) = (
""":panel[$Caption $Flag]{backgroundColor=$color color=white}"""
):
But i'm not sure how to change it exactly , can you help?
thanks!
Shira
adding the structure i'm using - https://obok.atlassian.net/plugins/servlet/ac/com.almworks.jira.structure/structure-widget#!s:688
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Shira Hanan ,
Sorry, I am not understanding what the desired end result is.
Could you please reach out directly via support@almworks.com or support.almworks.com?
We can set up some time to review all of the specifics in more detail.
Look forward to hearing from you.
Best,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.