Hi,
I have created a budget status field and returns:
Result type:
<a href="https://pmo.sure.com/secure/JMWEGroovyScriptTester.jspa#" target="_blank" rel="nofollow noopener noreferrer">String</a>
Result value:
<div style='background-color: green; color: white; padding: 5px; width: 95px; border-radius:4px; text-align: center'><b>Under Budget</b></div>
I would like to use the out put from the 'budget field' to create a project status. The out put from the budget field is above a long string. I would like to pick out a word from this string then use this. Do I need to feed the 'Budget Status' into a variable then search this for a word ie Under Budget
Is this possible?
Thanks for your help
Kevin
My script so far is now working:
import com.atlassian.jira.component.ComponentAccessorissue.statusissue.getAsString("Budget Status")
if (Budget Status == '<div style='background-color: green; color: white; padding: 5px; width: 95px; border-radius:4px; text-align: center'><b>Under Budget</b></div>')
{
result += "<div style='background-color: green; color: white; padding: 5px; width: 95px; border-radius:4px; text-align: center'><b>On Schedule</b></div>"
}
return Result