Fixing issue histoy when we had description changes

stable
Alejandro Alonso 2014-07-09 10:41:01 +02:00
parent ac0b08a036
commit 8fed4d31dc
3 changed files with 15 additions and 4 deletions

View File

@ -74,6 +74,13 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
loadHistory: ->
return @rs.issues.history(@scope.issueId).then (history) =>
_.each history.results, (historyResult) ->
#If description was modified take only the description_html field
if historyResult.values_diff.description?
historyResult.values_diff.description = historyResult.values_diff.description_html
delete historyResult.values_diff.description_html
delete historyResult.values_diff.description_diff
@scope.history = history.results
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")

View File

@ -14,9 +14,11 @@ section.us-activity.hidden
span(tg-bo-html="key")
div.activity-fromto
p
strong from <br /> {{ ctrl.getChangeText(change[0]) }}
strong from <br />
span(tg-bo-html="ctrl.getChangeText(change[0])")
p
strong to <br /> {{ ctrl.getChangeText(change[1]) }}
strong to <br />
span(tg-bo-html="ctrl.getChangeText(change[1])")
//a.more-activity(href="", title="show more comments")
// span show previous activity

View File

@ -9,6 +9,8 @@ div.us-activity
span(tg-bo-html="key")
div.activity-fromto
p
strong from <br /> {{ ctrl.getChangeText(change[0]) }}
strong from <br />
span(tg-bo-html="ctrl.getChangeText(change[0])")
p
strong to <br /> {{ ctrl.getChangeText(change[1]) }}
strong to <br />
span(tg-bo-html="ctrl.getChangeText(change[1])")