I need to make a field mandatory if the Project category matches certain conditions
How do I fetch Project information inside the Behavior Script
I 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.ComponentAccessor
import com.atlassian.jira.project.ProjectManager
def 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 Deepak
Despite 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.
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.