Forums

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

How to get selected field when creating task in JIRA from own plugin

zodor
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!
June 12, 2020

I have created an own plugin using Atlassian SDK that fetches data from an API and populated a select-list in a JIRA Task. This works perfect. It works like this.

The plugin is created by the command:  atlas-create-jira-plugin

Whenever I change the selected itim in the CUSTOMER select-list it triggers my java code and updates the FLOW select-list with new options from the API.

The Code that is triggered:

...
import com.atlassian.jira.issue.customfields.impl.SelectCFType;
...

@
Override public Map<String, Object> getVelocityParameters( Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem ) {
.....
}

This works perfect when you clicks Create Task, or when you click Edit Task. In edit task whenever I change the CUSTOMER list it triggers the code and updates the FLOW list....

BUT, when the task is newly created and the java code has initially updated the select-list for the first time and I have NOT saved the task-popup window, it will does not trigger my code when I select a new item in the CUSTOMER list.

How could this be accomplished. Somehow I need to have my CUSTOMER list trigger my java code: getVelocityParameters. Why does this work out-of-the-box in the Edit-mode, but not in the Create-task-mode?

 

 

0 answers

Suggest an answer

Log in or Sign up to answer