aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee')
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee25
1 files changed, 25 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee
new file mode 100644
index 00000000000..cb7571ec385
--- /dev/null
+++ b/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee
@@ -0,0 +1,25 @@
+define [
+ 'issues/facets/base-facet'
+], (
+ BaseFacet
+) ->
+
+
+ class extends BaseFacet
+
+ getValuesWithLabels: ->
+ values = @model.getValues()
+ actionPlans = @options.app.facets.actionPlans
+ values.forEach (v) =>
+ key = v.val
+ label = null
+ if key
+ actionPlan = _.findWhere actionPlans, key: key
+ label = actionPlan.longName if actionPlan?
+ v.label = label
+ values
+
+
+ serializeData: ->
+ _.extend super,
+ values: @getValuesWithLabels()