+_.mixin({
+    findByValues: (collection, property, values) ->
+        return _.filter(collection, (item) ->
+            return _.contains(values, item[property])
+        )
+})
+
+
 GmHistoryDirective = ($compile, $rootScope, $i18next) ->
     restrict: "A"
     require: "?ngModel"

                        else null
                    when "status"
                        if value
                            return scope.constants.taskStatuses[value].name
                        return null
                    when "assigned_to"
                        if value
                            return scope.constants.users[value].full_name
                        return $i18next.t("common.unassigned")
                    when "is_iocaine", "is_blocked"
                        if value is true

                        else null
                    when "watchers"
                        if value
                            watchers_ids = _.map(value, (v) -> parseInt(v, 10))
                            watchers = _.findByValues(scope.constants.users, "id", watchers_ids)
                            return _.map(watchers, "full_name").join(", ")
                        return null
                    else value
            task: (name, value) ->
