Dear community,
please help to find right way how to do it.
Usercase:
I need a new button (web item, in opsbar-operations).
When I will push it, new dialog or jira screen will be shown. In this dialog I need to place multiple checkboxes or list with multiple choices to choose type of tasks to create.
When I will push submit button, new tasks of selected types will be created based on data from dialog and fields values of actual issue.
I know how to use scriptrunner(groovy scripts) and jira automation add-ons, write simple java/javascript code, but can't write full add-on.
Simplest but terrible way is to create new transition for each status that goes to the same status and assign there screen with 1 custom field (list with multiple choices). Then create in "automation for Jira" listener of this field change and create issues based on field value. But this way looks not the rightest.
"Automation for jira" allow to create new web-items if manual trigger is selected, but it cannot trigger dialog or jira screen.
Scriptrunner can create web items with dialog, but I dont know exactly how to make that dialog so that it will start scriptrunner script or trigger automation for jira rule.
Please help in which way should I dig
Regards,
Alexander
Have you taken a look at the documentation: Web Item: Dialog (advanced)?
It have a simple example for you to build on. You need to build your dialog from ground up though.
You can certainly setup a transition screen with multiple list custom fields and create your tasks via ScriptRunner's post-function/listener, and even linked these created task issues properly. I am not sure why you need to involve "automation for Jira" in this case.
Good day Max,
I checked yesterday full documentation section, and didn't find simple example/explanation how to combine all parts together.
If I understand correctly
1. I create new REST Endpoint with .groovy file that will read needed context and have html code for construction of dialog form.
Question: how to create form with elements like user picker field? (text field with custom js?)
2. I create new web-item in section operations-top-level: set place, key, type=code and dialog, condition=true and set link to REST Endpoint created in 1
3. I create new web resource fragment with .js file and write all logic that needed on button click or another action on form.
Question: Link between html description of element and js code is done by right ids of elements. But when I create web resource I need to set context, what context should I choose?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, I can simply recommend the feature. The rest is beyond my experience.
As I mentioned, I don't think your use case requires such advanced feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks , I made it this way.
May be I will find later time to learn using js and html in jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.