Вечер добрый, комрады!
Собственно, требуется помощь со скриптованным полем в ScriptRunner.
Суть такова: если у поля A есть значение, то поле B должно его отображать. Если у поля А значения нет, то поле B должно отображать значение поля C.
import com.atlassian.jira.component.ComponentAccessor
def bf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("A")
def cs = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("C");
if(bf) != null {
return issue.getCustomFieldValue(bf)
else
return issue.getCustomFieldValue(cs)
}
Будет ли сие работать?
А, нашёл проблему.
import com.atlassian.jira.component.ComponentAccessor
def bf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("A")
def cs = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("C");
if(bf) {
return issue.getCustomFieldValue(bf)
} else {
return issue.getCustomFieldValue(cs)
}
Вопрос закрыт, всем спасибо.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.