The scenario: We categorise our projects based on a groupings, approval status and whether the project is closed.
e.g. High, Medium, Low, Approved, New ideas... Closed Projects.
This helps us view the Portfolio of projects we have, see what's coming and new idea's (projects) being discussed and what's been closed.
Is there a way to automatically change the project category from say "High" to "closed" using the workflow steps within an issue.
E.g. if the parent issue of the project is closed, then the project category is changed to "Closed Projects"
Thanks
This should set the project category to "Closed Projects"
import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.Issue import com.atlassian.jira.project.Project import com.atlassian.jira.project.ProjectCategory import com.atlassian.jira.project.ProjectManager Project project = issue.getProjectObject() ProjectManager projectManager = ComponentAccessor.getProjectManager() ProjectCategory projectCategory = ComponentAccessor.getProjectManager().getProjectCategoryObjectByName("Closed Projects") projectManager.setProjectCategory(project, projectCategory)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dieter - I just wanted to say thanks for your help with the above. I've passed this onto one of our developers and it's in their queue (still). Appreciate you taking the time to put the code together.
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.
Ideally we'd only do this at the last transistion. We have a Parent issue type called Project Management which covers all activities that the PM performs over the life of the project. When that issue type is closed in the last transistion we wanted to update the project category to closed as part of the post function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But won't it be an overkill to determine the project category during every workflow transistion? And just for my understanding, what do you mean by 'parent issue of a project'?
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.