Hi to all,
I have a problem running an import library WorkflowUtils. (The import is: import com.googlecode.jsu.util.WorkflowUtils)
In Jira v 3.13.4 runs perfectly but in an instance of JIRA v 4.4.1 can not find the library.
I need to do this import that to call the function: WorkflowUtils.setFieldValue_test (new_asign, customfield_ + id, dat, changeHolder)
Any idea?
Thnks!!!
i ran into the problem once (https://studio.plugins.atlassian.com/browse/JSUTIL-53) and found Jamie's recommendation on https://studio.plugins.atlassian.com/wiki/display/GRV/Script+Runner to not use WorkflowUtils anymore in groovy script runner scripts. There is a workaround without JSU on the script runner page.
Since my scripts heavily depend on WorkflowUtils also i have decided to create my own branch and develop this on my own if necessary. Whenever possible i try to avoid JSU and use JIRA APIs instead
CustomFieldManager customFieldManager = componentManager.getCustomFieldManager()
String sourceCfId = "customfield_10030"
String targetCfId = "customfield_10030"
CustomField cfSource = customFieldManager.getCustomFieldObject(sourceCfId)
CustomField cfTarget = customFieldManager.getCustomFieldObject(targetCfId)
if (issue.getCustomFieldValue(cfSource) != "Major")
{
issue.setCustomFieldValue(cfTarget, "some new value")
}
This is the workaround without JSU
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.