How to set custom condition in a webitem jira plugin

Deepali Bagul March 14, 2018

Hi All,

I am new to developing the jira plugins. I want to set a custom condition on a webitem which points to a link. The button is visible on issue view page.

I want the button should be only visible on projects that belongs to specific category. Below is the code for condition

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.Project

Project project = jiraHelper.getProjectObject()
def projectCategoryForProject = ComponentAccessor.getProjectManager().getProjectCategoryForProject(project)?.getName()
projectCategoryForProject in ["HyperWorks"]

But I do not know how and where to set this condition in atlassian-plugin.xml

Also please guide how to create condition class and where it resides.

please guide. Thanks in advance!

 

0 answers

Suggest an answer

Log in or Sign up to answer