Create Custom Field For Location

I am looking for a way to create a custom field that is a single select field. What I would like to do is have a select field that displays locations from an external database. I would like the options to be limited based on the user that is logged in, based on permission to that location.

Can this be done through a Connect app or the API?

At a minimum, I would like to have a select field that would have options based on an external database that we can update periodically when the location list changes.

Again, can this be done through a Connect app or the API or both?

I have looked at the basic Connect app documentation and examples but haven’t found a good tutorial that really teaches how to do what I want. It feels as if I have hit a wall and can’t get around it.

We have been using Jira for a year now and I have looked into building further customization and have had a hard time getting into building custom apps or going further than the basic setup. Any direction that can be given or advice will greatly be appreciated.

Thanks!

Hi @greg.russon welcome to the Atlassian Developer Community.

It sounds like you want an Issue Field of type Single-Select type that can be populated with the REST API Create issue field option as mentioned in the Issue Field docs in the first link.

Additionally, there is some sample code of an app that uses Issue field on that page. You can find the code here

By the way, you might be interested in Developer Day at Atlassian Summit in April. We’ll be covering the Fundamentals of building apps and integrations for our Cloud products that day. Check out this page for more details..

Hope to see you there.
Ralph

1 Like

Thank you @rwhitbeck! This is the direction that I was thinking, but was having a hard time finding some examples. I will look at the code you linked.

I will look into the Atlassian Summit and see about attending.

Thanks again!

1 Like

Okay, I have created a custom field through an Atlassian Connect app and was able to create the options for the field using data from our database. Now, if possible, I would like to limit those options based on the user who is logged in. Basically, what I would like to do is something like what is accomplished through the config option in the API, except instead of showing or hiding the option based on what the project is, I would like to show or hide the option based on some value tied to a user or customer.

Can the config scope from the API be used only for limiting options for different projects or can it be used for other things like properties?

Is there some other way of accomplishing this. I looked through the example that @rwhitbeck shared and it looks like the options are created or removed from the field based on a custom page. This would work for the overall set of options, but that doesn’t change and my app is able to manage what the overall set is supposed to be through the API. I’m really looking to show or hide options not add and remove them.

Thanks!