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

Hello

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

155 views 2 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you