I need to make a field mandatory if the Project category matches certain conditionsHow do I fetch Project information inside the Behavior ScriptI am working on Jira Cloud Environment.
Hi @Ishan Mandhan ,
Thanks for reaching out here in Atlassian community.
You can try something like this:
Fetch all projects and check with category, if category matched you can mark the Field mandatory:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.project.ProjectManagerdef customFieldManager = ComponentAccessor.getCustomFieldManager()def projectManager = ComponentAccessor.getProjectManager()def projects = projectManager.getProjectObjects()def filteredProjects = projects.findAll{ if(it.projectCategoryObject) { if(it.projectCategoryObject.name in ["Common", "Engineering"]) { it } }}
See if this is helpful !!
Regards,
Deepak
Hello DeepakDespite attempting to utilize these Components and Objects, they do not function in the Jira Cloud Environment.However, I truly appreciate your valuable input and efforts to assist me in finding a solution. Your support is highly appreciated, and I remain open to any further suggestions or alternatives to address this issue effectively.
It looks like you're new here. Sign in or register to get started.