I have the following code:
var deptChief = team.findMembersByRole('Deputy Chief');
var districtChiefs = team.findMembersByRole('District Chief');
var trigger = $util.getValue('Vacancy_Type');
if (trigger == null) {
$result = $util.union(deptChief, districtChiefs);
} else {
$result = deptChief;
}
When I test the filter in the edit filter window with an empty Vacancy_Type value
The result is just the deputy chief variable and not the deputy chief and district chiefs together.
However, it generates the correct result (deputy and district chiefs list) when it runs in the instance. This isn't a big issue because when it runs in the instance it is correct, but it does mess up testing/debugging if I were to try to write a new filter script for something else and needed to test something I wasn't sure about. I looked to see if anyone else has posted about this issue but didn't see anything so I wanted to bring it up as a potential bug.