I'm looking for a way to have our users add Parent & Child values to a cascading list, for our closed service desk portal. Scriptrunner is installed on our Jira, but I'm very new to scripting. I know that there is a built-in script that would allow me to add to the cascading list, but we are looking to add to the list at the time the request is created and not have to be done by an Admin/admin page.
My Fields
Cascading list: "Network Programs" (this is the custom field I want to add to)
Custom field 1: "Series Name" (reporter will fill this out, and will be added to the Parent side of the cascading list)
Custom field 2: "Episode Name" (this would be added as the child to the Series name)
Custom field 3: "Episode Name 2" (this would be added as the child to the series name)
I've searched this forum but I haven't seen anything works for our use case, especially since we need to allow our users to fill out more than 1 episode name field at the time they create the ticket.
Thank you
Ok, I understand now.
You will want to use the createOption function in the OptionsManager class. Unfortunately, I don't know exactly how to do that for cascading selects, and I can't find a decent example.
I think that you create "Parent" options (such as your "series name") as though the field is a single-select, then for the child options, you have to create option objects that name the parent as well as define the child option.
Okay, I'll give that a try and see if I can figure it out.
Thanks for your help, i'll report back if it works.
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.
A regular cascading field consists of just one "Parent" and one "child". If you need anything other than this (namely more than one level of children or more than one child selected) I believe you'll have to try some plugin/app.
Take a look at https://marketplace.atlassian.com/apps/5008/multi-level-cascading-select?hosting=datacenter&tab=overview or others like that one.
Once you have this sorted out you can take a look at the automation part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I think there may be a misunderstanding. I’m not looking for more then 1 child list, I need to add multiple child values to the same parent
ie
series name
Episode 1
Episode 2
series name will be added to the parent side of the list, while all episodes names would be the children of the series name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cascading selects are single value, you can't do "Parent / [several children]", the value can only be "Parent / Single selected child"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know when I select from the drop-down that they are Parent/Single Selected Child, but I'm looking to use a post-function tot ADD values to the drop-down.
Use case:
Person A comes to my portal and selections New Network Series add
They fill out the form:
Custom field 1: "Series Name" (will be added to the Parent side of the cascading list)
Custom field 2: "Episode Name" (this would be added as the child to the Series name Parent)
Custom field 3: "Episode Name 2" (this would be added as the child to the SAME series name parent)
Now my team will be able to the newly entered Series Name & Episode names on our to create the airing IDs. We Select the series name & episode name from the "Network Programs" list that was just edited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you do not want "to add multiple child values to the same parent", you want to automate the addition of new options to the selection lists?
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.
And does it necesarily have to be done through a postfunction? or could you use something like this plugin? https://marketplace.atlassian.com/apps/1212096/customfield-editor-for-jira?hosting=server&tab=overview
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At this time, we are not looking to take on any more plugins, as we already have automation for jira & script runner installed. The goal/hope is that we can do as much of what we need to do with these plugins.
I will take a look at the plugin you suggested and see if it is something that we should consider in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can definetely do A LOT of things with "just" those two :)
I hope you can make it work. Try to contact the scriptrunner team and they might point you in the right direction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.