This is for building the structure.
If (MATCH(issuetype, "Epic") ; If (MATCH(resolved,""); If (MATCH(JOIN#children{storystatus},"*NOPLAN*"); "{panel:bgColor=#ff5733}NEED PLAN{panel}"; MATCH(JOIN#children{storystatus},"*RED*"); "{panel:bgColor=#ff5733}LATE{panel}"; MATCH(JOIN#children{storystatus},"*YELLOW*") ; "{panel:bgColor=#ffc300}AT RISK{panel}"; "{panel:bgColor=#0cff00}ON PLAN{panel}"); "{panel:bgColor=#0cff00}COMPLETE{panel}" ) )
this is the Formula for variable story status
IF(issuetype != "Epic"; IF(!DEFINED(resolution); case( sprint; ""; "NOPLAN"; "/(?:,([^,]+)){2}/"; "RED"; "/(?:,([^,]+)){1}/"; "YELLOW"; "GREEN" ) ) )
Hi David,
Welcome to the community!
First I should mention it looks like this answer is tagged with Jira-cloud, but you are definitely on Server or datacenter. On cloud you can't have one formula reference another.
Secondly, I've reformatted the code so it is easier to read but haven't changed it functionally.
If (MATCH(issuetype, "Epic") ;
If (MATCH(resolved,"");
If (MATCH(JOIN#children{storystatus},"*NOPLAN*"); "{panel:bgColor=#ff5733}NEED PLAN{panel}";
MATCH(JOIN#children{storystatus},"*RED*"); "{panel:bgColor=#ff5733}LATE{panel}";
MATCH(JOIN#children{storystatus},"*YELLOW*") ; "{panel:bgColor=#ffc300}AT RISK{panel}";
"{panel:bgColor=#0cff00}ON PLAN{panel}");
"{panel:bgColor=#0cff00}COMPLETE{panel}" ) )
Going line by line:
Ultimately the Regular expressions are the hardest part to decode, but hopefully I've helped to point you in the right direction.
I would expect there are much nicer ways to do what someone has tried to do here. I'd start with our sample formulas documentation.
Cheers,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.