Hello,
i want to access a customfield Value from a parent Ticket via a Sub-Task. The CustomField has a configured Context to be only on the parent issue Type (Task).
def subTask = event.issue
def parentIssue = subTask.getParentObject()
def customField = customFieldManager.getCustomFieldObjectByName("my field")
def cfValue = parentIssue.getCustomFieldValue(customField)
Script seems fine.
Did you do logging to see the values in each line? I believe you got the parentIssue object properly and there is nothing wrong with the customfield naming. Can you double check it? You can also use this id form to be sure.
customFieldManager.getCustomFieldObject("customfield_xxxxx");
Also, please check if cf has a value in parent issue (task).
*I assume you already defined this in your code:
def customFieldManager = ComponentAccessor.getCustomFieldManager();
yes i checked already. Running the code with hand-coded Parent Ticket and SubTask it works fine, values are there. Just within the Listener it doesn't work, even if it gets the Issues right (SubTask -> Parent Ticket). It cannot access the CF Value (always NULL).
But i already tried to open the Context to the Type *Sub-Task* which suprisingly also returns Null afterwards. I have to say, that the value comes from a CustomField which is provided via the STAGIL Table Plugin. Maybe there is the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.