It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Best approach to display information from Stash to a Jira screen without saving unwanted data?


I would like to start this question by explaining what I am trying to achieve. I'm creating a new Jira screen, full of my required custom fields, which will have a connection with Stash. This connection is used so that on the Jira screen I can select from a list of project repositories, and also have a second select list consisting of the last 15 commits performed on the selected repository generated.

I've been using the scriptrunner plugin in order to create this connection using a groovy scripted field, where initially I was updating a single-select custom field to populate it with the list of project repositories. However, by using this approach, I realized that it would get very messy as the number of commits on the second select list gets updated over and over, creating many entries on the Jira database (at least from what I understand, this assumption might be wrong but I haven't found clear information on this).

The next approach I considered was using the scripted field to return an HTML/MarkupBuilder string consisting of a select list with the appropriate options, and having that added onto the Jira screen, where the selected value could be saved on a read-only custom field and there would be no need to save the select options anywhere in Jira. However, this approach has left me stuck, as I cannot figure out a good way to display the HTML/MarkupBuilder content on the screen. I'm sure I might be taking the wrong approach on this, but I just cannot find the way to get this to display on the new screen. Am i supposed to add it as a temporary field? Or is there some special way to display html content on the screen?

What i know I do not want is to save the select lists anywhere in Jira, as the contents will change over time. The only thing I want to record in the created/updated JIRA issue are the selected options in a couple of read-only custom fields.

Any input is appreciated!

1 answer

1 accepted

1 vote
Answer accepted

This is pretty much exactly what select list conversions are for.

Set up rest endpoints to get those bits and pieces, and a behaviour to convert text fields to pickers.

Thank you, I will definitely be looking into this in more detail. I'm pretty new at using script runner, so I am not fully familiar with the entire usage quite yet. The last question I wanted to bring up was regarding the second select list in my requirements. Its values are completely dependent on the value chosen for the first select list. So if I were to use select list conversions, I assume that a behavior would handle updating the list of available options based on the current value of the first list?

Once again thank you, the help is greatly appreciated!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

We want to hear from you! How do you use Slack and Atlassian together?

Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...

24 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you