Fixes filter for (none) in custom fields.

The id -1 and the empty string both need to be added as values in the
(none)-case, since (none) has to both match work packages with custom
fields with an empty value and work packages with no custom field.
pull/834/head
Martin Czuchra 11 years ago
parent a2d8c266d6
commit 79f6e59fbd
  1. 9
      app/assets/javascripts/timelines/TimelineLoader.js

@ -750,6 +750,15 @@ Timeline.TimelineLoader = (function () {
if (custom_fields.hasOwnProperty(field_id)) {
var value = custom_fields[field_id];
// -1 and the empty string both need to be added in the
// (none)-case, since (none) has to both match work packages
// w/ custom fields w/ an empty value and work packages with
// no custom field.
if (value.length === 1 && value[0] == "-1") {
value.push("");
}
if (value && value !== "" && value.length > 0) {
hash["cf_" + field_id] = value;
}

Loading…
Cancel
Save