Hi, I need to have a custom field, single select box, where I get the options from a different system.
I understand how to create a custom field and manually creating the different options.
is it possible to get the list of options from another system via an API call?
Hi @[deleted] ,
If you are using a form in a JSM project, you can use data connections, take a look at: https://support.atlassian.com/jira-service-management-cloud/docs/create-edit-test-or-delete-data-connections-for-forms/
If you use (regular) Jira, then you need to create an automation rule, that gets the options and add them via the rest api.
The hard part is the next time your run the automation, you need to only add/disable the differences of the two lists.
Thanks, this is for regular Jira Cloud
I am looking into using ScriptRunner to call the REST api of the source application.
As I understand it, in ScriptRunner you can call the REST api of Jira.
So I am thinking that in the script I can call the REST api of the source to get the options I want to represent, and then call the Jira REST api to populate the custom field.
And as you said, figure the logic when the data has changed in the source application
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure about ScriptRunner, but I did something similar a while ago using a middleware. Here’s what I did:
The middleware can be run on a schedule or triggered by an event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do I understand it correct that this is what you did?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, makes more sense to me :)
I can try that route, either azure functions or AWS Lambda.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
No you can't you can get the items maybe by creating an automaton rule that executes a webrequest to get the options and then you will need to create another webrequest to the JIra API store the options, then you will be able to use them in JIra.
But the options ned to be stored in Jira to be used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. While researching more I found that I maybe should be able to do this with ScriptRunner.
With that I should be able to call an external api and populate the options.
I have not confirmed any of this. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
Does the source you are trying to reach have an API option, if not, then you can't go the way I suggested.
If the source has an API, check the API docs on how to get the information.
Jira API docs can be found here: api.atlassian.com
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.