I'm nesting filters into folders under a JQL query in a structure . I'm worried that my if statements will grow and quickly become unmanageable. I've thought about using the map function that would only have me use one if function and pass values in from an array but it doesn't work for me. How can I re-write my function to make it work or is there another solution to abstract the multiple if statements ?
Current implementation
if(IF (JQL{summary ~ "Mango"}, Mango) , "Mango") or
if(IF (JQL{summary ~ "Apple"}, Apple) , "Apple") or
if(IF (JQL{summary ~ "Orange"}, Orange) , "Orange") or
if(IF (JQL{summary ~ "Cherry"}, Cherry) , "Cherry")
Proposed solution
MAP(ARRAY("Mango", "Apple", "Orange", "Cherry"), (keyword -> IF (JQL{summary ~ keyword}, keyword) )
I followed this article for my current implementation
https://community.atlassian.com/t5/Jira-questions/Nesting-filters-into-folders-under-a-JQL-query-in-a-structure/qaq-p/1666172