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!