I have a reference property of an item called "user_linked_requirement".
As the requirements put in this field are in the order that they are put in I would like to sort the property based on the identifier of the requirements.
I tried this :
var test = selection[0].user_linked_requirements;
test.sort(function(a, b) {
return a.identifier.localeCompare(b.identifier);
});
But I get an error (in french sorry) saying that it's impossible to use the function java.util.Comparator because it contains methods with different names.
I used the sort and localCompare functions in other contexts and I never had any error.
Thank you,
Adrien Gérard