Location from WorkflowUtils class

Albert Iglesias Gómez November 24, 2011

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!!!

1 answer

0 votes
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2011

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

Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 24, 2011

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events