Hello, i have Jira server v8.2.3 and Scriptrunner 6.20.0
I try to do this
1/ Get information from api rest
2/ Parse result and store result (database ? custom field option ?)
exemple
projet pkey A10 value HUM0010
projet pkey A10 value HUM0011
projet pkey A20 value HUM0012
projet pkey A20 value HUM0013
projet pkey A30 value HUM0014
projet pkey A40 value HUM0015
(only get 1 time per day)
3/ Have a custom field where selection is filter by issue context (projet key)
This field could be edit by users, user select value
key project is for example A10 and user possible select in field was HUM0010 or HUM0011
(filter by projet pkey)
I try to use "Script Fields" but field can't be edit by user
A "Behaviours" script can do this ?
Did you have idea for storage data ?
And idea for field filter for user ?
Thanks
Fred
There are a few different directions you could use for this
Example local storage
import groovy.json.JsonSlurper
import groovy.json.JsonBuilder
import com.atlassian.jira.component.ComponentAccessor
def data = [
[pkey:'A10', values:['HUM0010', 'HUM0011']],
[pkey:'A20', values:['HUM0012', 'HUM0013']],
[pkey:'A30', values:['HUM0014', 'HUM0015']],
]
//store the data
ComponentAccessor.applicationProperties.setText('mycustomkey', new JsonBuilder(data).toString())
//retreive the stored data
def myData = new JsonSlurper().parseText(ComponentAccessor.applicationProperties.getText('mycustomkey'))
Hello, thanks for your reply.
I remember solution 2, i have store data with sucess.
With this solution, i have to create 2 fields ? 1 for project key (issue contexte) dans 1 for select value ?
With Behaviours Select List Conversions, in "Initialiser", i don't understand what to put on.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.