I’m not sure if I should ask here, or in the atlassian connect tools thing.
I have an addon created with a webpanel that only shows up when the project_type is service_desk.
Ideally I would like to make this something I can configure in the settings page. Only show up for specific project/project types.
Is this something that can be managed dynamically? Maybe a specific return code to hide the webpanel?
One way to do it would be to have a composite condition that exhibits this logic:
(The project type is "business" and "business" is in the list of selected project types in this other property) OR
(The project type is "service_desk" and "service_desk" is in the list of selected project types in this other property) OR
(The project type is "software" and "software" is in the list of selected project types in this other property)
You’d cringe if you saw that construct in, say, a Java program, but the web panel conditions aren’t exactly Turing-complete, and you can get away with it because there are only three project types.
I was more thinking about the selected project types in this other property bits.
I’ve set attributes for issues in past projects, but issues is too late I think. Is it possible to set attributes on projects? Entity properties only mentions issues
My assumption is that you will have a settings page in the Administration area of JIRA - a global administration page rather than a project administration page. The user will select one or more project types on that settings page. Your web panel will appear when the current project context (an issue, say) matches one of the selected project types on your settings page.
If my assumptions are correct, then I’d advise you to store the list of selected project types in add-on properties.
Sweet. I’ll create a ticket when I have a few min.
Its the configure page, its not going to be hit that often, so shouldn’t be a big deal to do a bunch of requests. We’ll see when I move it to our real instance.
I’ll do a bit more polishing but I think I should be allowed to open source the whole project