Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Is it safe to rearrange a custom field with type Multiselect?


#1

Hi,

i have a custom field with the multiselect type. I have added some options and some test cases already use one or more of these options.

Now I realised that it would be smarter to have the options of the multiselect sorted alphabetically, but I don’t dare to rearrange them as this might break test cases ?!

Is it safe - or to what degree is it safe to rearrange the options ?

I assume that given the following state

1, something
2, foo
3, bar

I cannot simply leave the numbers as they are - so

1, bar
2, foo
3, something

would probably break things, right

I hope this would be ok

3, bar
2, foo
1, something

so rearrange the options, but keep the indices - is this possible ? is this a non-breaking change ?

Of course its not the optimal solution, as new options will be placed somewhere in the ordering, with numbers completely off any ordering.

But I assume there is no other way to display them sorted, maybe ? So that the customs field sort them when displaying ?

Thanks
Andreas


#2

Hello Andreas,

Thanks for your posting! Yes, you can rearrange custom field values and this is fully supported. It’s just important that you keep the same ID => label mappings for the values. So, switching from

1, something
2, foo
3, bar

to:

3, bar
2, foo
1, something

is fully supported. TestRail respects the order as configured and it wouldn’t automatically change the order based on the label, for example.

I hope this helps!

Cheers,
Tobias


#3

thanks for the answer - feel more comfortable then to change that:)


#4

follow up question.

And what happens when I delete an item in the list ? Do get all test cases, that had the option set, updated, is the deleted option simply gone ?

Or should all test cases first remove this option before deleting it from the list ?


#5

Hello Andreas,

If you remove a value, TestRail would render case attributes with this value as empty (e.g. in the case tables). I would rather recommend adding an additional note to the value (such as (Deprecated)), so other users don’t use it for new test cases etc., but keep it intact for existing cases.

Cheers,
Tobias