Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to check a parent issue custom field

Jacob francois
October 11, 2018

I am working on a post function custom email -

 

I am looking to create a condition that checks if a certain checkbox was selected in the parent issue. 

 

---------------------

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Neta Elyakim
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 Champions.
November 6, 2018

Just enter your project key instead of "EnterYourProjectKey".

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.project.component.ProjectComponent
import com.atlassian.jira.bc.project.component.ProjectComponentManager
import com.atlassian.jira.project.ProjectManager

def projectComponentManager = ComponentAccessor.getComponent(ProjectComponentManager)
def projectManager = ComponentAccessor.getComponent(ProjectManager)
def project = projectManager.getProjectByCurrentKey("EnterYourProjectKey")
long projectId = project.getId()
Collection<ProjectComponent> projectComponents = projectComponentManager.findAllForProject(projectId)
return projectComponents
Tomáš Vrabec _ServoData_
September 9, 2020

Thanks for this one!

Sayan Kaiser
Contributor
March 7, 2022

Thanks Neta

TAGS
AUG Leaders

Atlassian Community Events