Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add checkbox to "create Issue" dialog in jira?

Yann L
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 8, 2015

When creating an Issue I would like to have a checkbox additional to the Summary, Reporter etc. When the checkbox is checked I want to run a java application.

Since I'm a beginner in JIRA development it's difficult for me to find the right approach for my problem. I already went through the "Set up the Atlassian Plugin SDK.." Tutorial. Where should I go now from this point?

2 answers

1 accepted

4 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2015

There's two parts to this.

First, a checkbox is easy - go to admin -> custom fields, and add a "multi check box".   Give it a single option.  Then go to admin -> Screens and find the "issue create" screen you want to add this to.  Add the new custom field.

The second part is handled by the route you've started down - you need a post-function added to your create transition - it should check the value of the custom field and run your stuff if it's checked.  See https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/workflow-plugin-modules for building an add-on to provide that function

Yann L
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2015

First thank you for your answer. I created the checkbox in the create issue dialog and the add-on with the post function module. If I understand correctly, I add the input (in my case I have no input) for my postfunction to the PostFunctionFactory class and the java code which i want to run will be added to the PostFuncion class. How can I check now the checkbox in the PostFunction class? Is it possible to prompt a Function which runs outside of the local jira or does is work similar to a sandbox? (As example: can I write something into a txt file which is local on my computer through the post function add on?)

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2015

You could get a post-function to run external code (scripts or programs) on the JIRA server if you wanted to - java has a simple "exec" call to run other stuff. To look at the checkbox, it's the same as any custom field usage in a post function - you can read it from the issue - the links to the developer documentation given by Volodymyr and myself give you some examples of reading fields.

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2015

For me the best bet looks like to create post-function addon and configure it to run on issue create.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, dance, gamification, badge, razzle dazzle, team '25 anaheim

Earn a one-day badge today and do the Atlazzle Dazzle! 🕺

Today only! Share what you’re the most excited about for Team ‘25 or just dance out the beginning of a new quarter with us.

Comment the post
AUG Leaders

Atlassian Community Events