Hi, we've set up automation to copy Epic Summary into a custom text field "EN". The rule is working fine for the Company Managed projects but is returning "None" for the Team Manged Project for the Task type of Issues.... Here's what we are using:
1. When: Issue Created
2. If matches: Issue Type equals Subtask
2.1 Then: Edit issue fields - Set EN as {{issue.parent.epic.summary}} ---- Works fine on Company and Team Managed Projects.
3. Else - If matches: Issue Type is one of : Task, Bug, Story
3.1 Then: Edit issue fields - Set EN as {{issue.epic.summary}} ----- Works fine on Company Managed Projects but returns "None" for Team Managed Projects.
I have also tried to use parent instead of epic but that also returns "None". Please advise.
It's telling what the problem is, you're calling a method on *customfield* which you have not defined.
Use:
def customFieldManager = ComponentAccessor.getCustomFieldManager() def cf = customFieldManager.getCustomFieldObject(12345) def num = issue.getCustomFieldValue(cf)
Dear, Am using below script and facing the issue. Please assist..
import jxl.*;
import java.io.*;
def testdatafile= "F:\\TestData.xls";
log.info(testdatafile)
Workbook work= Workbook.getWorkbook(new File(testdatafile))
Sheet sheet1=work.getSheet("Sheet1")
def Base= (sheet1.getCell(0,0).getContents())
def Accoount= (sheet1.getCell(0,1).getContents())
log.info(Base)
log.info(Account)
log.info(Base1)
log.info(Account1)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ilka,
Thank you for your question.
I would kindly suggest you on trying the following:
import com.atlassian.jira.ComponentManager import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.security.groups.GroupManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.customfields.manager.OptionsManager import com.atlassian.jira.issue.fields.CustomField import com.atlassian.crowd.embedded.api.User import com.atlassian.crowd.embedded.api.Group import com.atlassian.jira.util.SimpleErrorCollection GroupManager groupManager = ComponentManager.getComponentInstanceOfType(GroupManager.class) CustomFieldManager cfManager = ComponentManager.getInstance().getCustomFieldManager() CustomField cf = cfManager.getCustomFieldObject(10005) Object customFieldValue = issue.getCustomFieldValue(cf) System.out.println(customFieldValue);
Kind regards,
Rafael
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.