Fixing issue histoy when we had description changes
parent
ac0b08a036
commit
8fed4d31dc
|
@ -74,6 +74,13 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
loadHistory: ->
|
loadHistory: ->
|
||||||
return @rs.issues.history(@scope.issueId).then (history) =>
|
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.history = history.results
|
||||||
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,11 @@ section.us-activity.hidden
|
||||||
span(tg-bo-html="key")
|
span(tg-bo-html="key")
|
||||||
div.activity-fromto
|
div.activity-fromto
|
||||||
p
|
p
|
||||||
strong from <br /> {{ ctrl.getChangeText(change[0]) }}
|
strong from <br />
|
||||||
|
span(tg-bo-html="ctrl.getChangeText(change[0])")
|
||||||
p
|
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")
|
//a.more-activity(href="", title="show more comments")
|
||||||
// span show previous activity
|
// span show previous activity
|
||||||
|
|
|
@ -9,6 +9,8 @@ div.us-activity
|
||||||
span(tg-bo-html="key")
|
span(tg-bo-html="key")
|
||||||
div.activity-fromto
|
div.activity-fromto
|
||||||
p
|
p
|
||||||
strong from <br /> {{ ctrl.getChangeText(change[0]) }}
|
strong from <br />
|
||||||
|
span(tg-bo-html="ctrl.getChangeText(change[0])")
|
||||||
p
|
p
|
||||||
strong to <br /> {{ ctrl.getChangeText(change[1]) }}
|
strong to <br />
|
||||||
|
span(tg-bo-html="ctrl.getChangeText(change[1])")
|
||||||
|
|
Loading…
Reference in New Issue