Using ScriptRunner Fragments
Hey Atlassian Community! I am trying to only display a fragment when certain conditions are met.
What I need help finding is how to actually get the fragment to show when these conditions are met. Using the script console I can verify that the script is finding everything outlined here, but I can't find the syntax to say "ok now show the fragment".
OR if there is another way to access the type of a child issue that is more straightforward than this please let me know.
Any ideas?
Issues.search("issuekey in childIssuesOf('$issue.key')").each { child ->
def childKey = child.key
def childType = child.issueType
log.warn "$childKey, $childType"
if ( jiraHelper.project?.key == "PTDEMO" || jiraHelper.project?.key == "MSPG" && childType.name in "Project Resources" && issue.issueType.name == "Initiative" && issue.status.name !in ["Created","Roadmap Item Triage","Roadmap Backlog","Will Not Do","Ready for Design","Design","Ready for Delivery","Delivery","QA Validation","Pending Release","GA/Shipped","Bugtail"]){
//display the fragment...
}
}