Fixing lost comments in issue
parent
9b857c172e
commit
466d04bf65
|
@ -115,18 +115,23 @@ class RepositoryService extends taiga.Service
|
|||
return @http.get(url, params, httpOptions).then (data) =>
|
||||
return _.map(data.data, (x) => @model.make_model(name, x))
|
||||
|
||||
queryOne: (name, id, params) ->
|
||||
queryOne: (name, id, params, options={}) ->
|
||||
url = @urls.resolve(name)
|
||||
url = "#{url}/#{id}" if id
|
||||
httpOptions = {headers: {}}
|
||||
if not options.enablePagination
|
||||
httpOptions.headers["x-disable-pagination"] = "1"
|
||||
|
||||
return @http.get(url, params).then (data) =>
|
||||
return @http.get(url, params, httpOptions).then (data) =>
|
||||
return @model.make_model(name, data.data)
|
||||
|
||||
queryOneRaw: (name, id, params) ->
|
||||
queryOneRaw: (name, id, params, options={}) ->
|
||||
url = @urls.resolve(name)
|
||||
url = "#{url}/#{id}" if id
|
||||
|
||||
return @http.get(url, params).then (data) =>
|
||||
httpOptions = {headers: {}}
|
||||
if not options.enablePagination
|
||||
httpOptions.headers["x-disable-pagination"] = "1"
|
||||
return @http.get(url, params, httpOptions).then (data) =>
|
||||
return data.data
|
||||
|
||||
queryPaginated: (name, params) ->
|
||||
|
|
|
@ -111,7 +111,7 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
delete historyResult.values_diff.description_diff
|
||||
|
||||
@scope.history = history.results
|
||||
@scope.comments = _.filter(history.results, (item) -> item.comment != "")
|
||||
@scope.comments = _.filter(history, (item) -> item.comment != "")
|
||||
|
||||
loadInitialData: ->
|
||||
params = {
|
||||
|
|
|
@ -105,7 +105,7 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
delete historyResult.values_diff.description_diff
|
||||
|
||||
@scope.history = history.results
|
||||
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
||||
@scope.comments = _.filter(history, (historyEntry) -> historyEntry.comment != "")
|
||||
|
||||
loadInitialData: ->
|
||||
params = {
|
||||
|
|
|
@ -116,7 +116,7 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin,
|
|||
delete historyResult.values_diff.description_diff
|
||||
|
||||
@scope.history = history.results
|
||||
@scope.comments = _.filter(history.results, (historyEntry) -> historyEntry.comment != "")
|
||||
@scope.comments = _.filter(history, (historyEntry) -> historyEntry.comment != "")
|
||||
|
||||
loadInitialData: ->
|
||||
params = {
|
||||
|
|
Loading…
Reference in New Issue