fix issue #4592 - change status in issues list
parent
9f3ee17836
commit
9b553583d9
|
@ -69,7 +69,6 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
bindMethods(@)
|
||||
|
||||
@scope.sectionName = "Issues"
|
||||
@scope.filters = {}
|
||||
@.voting = false
|
||||
|
||||
return if @.applyStoredFilters(@params.pslug, @.filtersHashSuffix)
|
||||
|
@ -560,10 +559,6 @@ IssueStatusInlineEditionDirective = ($repo, $template, $rootscope) ->
|
|||
event.stopPropagation()
|
||||
target = angular.element(event.currentTarget)
|
||||
|
||||
for filter in $scope.filters.status
|
||||
if filter.id == issue.status
|
||||
filter.count--
|
||||
|
||||
issue.status = target.data("status-id")
|
||||
$el.find(".pop-status").popover().close()
|
||||
updateIssueStatus($el, issue, $scope.issueStatusById)
|
||||
|
@ -571,12 +566,7 @@ IssueStatusInlineEditionDirective = ($repo, $template, $rootscope) ->
|
|||
$scope.$apply () ->
|
||||
$repo.save(issue).then ->
|
||||
$ctrl.loadIssues()
|
||||
|
||||
for filter in $scope.filters.status
|
||||
if filter.id == issue.status
|
||||
filter.count++
|
||||
|
||||
$rootscope.$broadcast("filters:issueupdate", $scope.filters)
|
||||
$ctrl.generateFilters()
|
||||
|
||||
taiga.bindOnce $scope, "project", (project) ->
|
||||
$el.append(selectionTemplate({ 'statuses': project.issue_statuses }))
|
||||
|
|
|
@ -69,6 +69,16 @@ helper.openAssignTo = function(index) {
|
|||
$$('.issue-assignedto').get(index).click();
|
||||
};
|
||||
|
||||
helper.changeStatus = function(index, statusIndex) {
|
||||
let status = $$('.issue-status').get(index);
|
||||
|
||||
return utils.popover.open(status, statusIndex);
|
||||
};
|
||||
|
||||
helper.getStatus = function() {
|
||||
return $$('.issue-status').getText();
|
||||
};
|
||||
|
||||
helper.getAssignTo = function(index) {
|
||||
return $$('.assigned-field figcaption').get(index).getText();
|
||||
};
|
||||
|
|
|
@ -123,6 +123,18 @@ describe('issues list', function() {
|
|||
expect(issueUserName).to.be.equal(newUserName);
|
||||
});
|
||||
|
||||
it('change status', async function() {
|
||||
await issuesHelper.changeStatus(0, 1);
|
||||
|
||||
let oldStatus = issuesHelper.getStatus(0);
|
||||
|
||||
await issuesHelper.changeStatus(1, 1);
|
||||
|
||||
let newStatus = issuesHelper.getStatus(0);
|
||||
|
||||
expect(oldStatus).not.to.be.equal(newStatus);
|
||||
});
|
||||
|
||||
describe('issues filters', sharedFilters.bind(this, 'issues', () => {
|
||||
return issuesHelper.getIssues().count();
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue