i have a custom field "check box" when i create a issue. However i would want to display this on the "Issue View Page" if the transition name is "A" but when i move this issue to other transitions like "B","C" etc this field should be hidden . i did try it using the behavior but doesn't seem to be working. Can anyone please help me on this.
Untitled.png
i have even tried adding this server side script on the behavior plugin for the custom field
import com.atlassian.jira.ComponentManager;
import org.apache.log4j.Category;
import com.atlassian.jira.workflow.JiraWorkflow
ComponentManager componentManager = ComponentManager.getInstance()
JiraWorkflow workflow = componentManager.getWorkflowManager().getWorkflow(issue);
def wfd = workflow.getDescriptor()
def actionName = wfd.getAction(transientVars["actionId"]).getName()
FormField SaveAsDraft= getFieldById ("customfield_14905")
String SaveValue = (String) SaveAsDraft.getFormValue()
if(actionName != "Draft")
{
SaveValue.setHidden(false)
}
else
{
SaveValue.setHidden(true)
}