The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.