Hello,
We're using the cascading select field as a "Matrix input" meaning each parent selection has the same child selections. Is is somehow possible with scriptrunner behaviours, to keep the selected child index selected, when the user changes the parent selection?
Or is there another possibility to simply have a matrix like input field?
Thanks!
No, you can't do this. Each "child" option in a cascading select belongs to its "parent" option. Keeping a child selected when changing the parent is nonsense, because it would no longer be a valid selection. (Technically, you could get Behaviours to do this on the surface, but then Jira will refuse to save the result because it's nonsense)
You should move to using two separate select lists if you need this sort of matrix.
I know the mechanics, and I know that It's a workaround, but since Jira is so limited, we need these workaround. It sure makes no sense when programming, but with jira these kinds of things are necessary to save you from loads of buggy plugins sadly.
Whatever, luckily our users can manage it themselves, until I find a way to fix it.
I'll post the working "nonsense" later in here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you're trying to bodge something that leads to presenting invalid data to your humans, who will then have to correct it before they can commit a change? Why put them in that position?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your fellow Payne did understand the use case correctly, you seem to miss it a little. No invalid data, and no correction anywhere just a simple automatism that helps the user. Just wait and maybe I get it to work to show you, so you know what I mean.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, but the way this is reading to me is that you want to show the user a field that is
parent 1 - child
then, when they change it to parent 2
you retain an invalid child that does not belong to parent 2, so they get
parent 1 - invalid data
Which they can't proceed with because it's wrong. I'm curious as to how this is useful, let alone friendly to the user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The use case is the following:
Selection:
Parent1 - P1 Child 3
User changes Parent 1 to parent 2 with jira default behavior the result would be:
Parent2 - P2 Child 1
What I want to achieve, is that with changing the Parent the child is reassigned accordingly as follows:
Parent2 - P2 Child3
So no invalid data and no problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But your same-named child is different objects - p1c3 is a different thing from p2c3 which means your data is invalid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know they are different objects, why should the data be invalid?
I can make the child selection by hand after changing the parent, so why should making the same change directly after parent change via script make the data invalid?
If It would be possible to manipulate the website source it would be as simple as:
Javascript OnChange routine on parent select field with selecting the corresponding child right after the child select field is populated with the new select options - violà.
Whatever, the disscussion here doesn't help it's just slowing me down right now If anyone did something similar already a hint would be nice, else I'll try myself and eventually, if I find a working solution I'll post it right here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Again, each child option belongs to a parent. When you have selected a child option, it belongs to a parent option.
Your data is invalid if you have a child option that is from a different parent. It's nonsense.
You aren't going to get any hints or a solution, what you're trying to do is useless as it will put nonsense data in front of the user, which Jira will then refuse to use because it is invalid. If anyone has done anything similar, they've removed it after realising it is useless.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If each parent has the same children, why use a cascading select field, and not simply 2 select fields?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Because Jira cannot display 2 fields in one line in edit screens and for the issue view two fields take a ridiculous amount of space compared to the cascading select method. That's the only reason to be honest.
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.