Fix local storage not being cleared after creating a new issue

Creating a new issue will always result in a 302 redirect to the newly-created
issue. This reverts the change introduced in
7684217d68
to handle the case where a user is in the middle of creating a new form and
redirected to accepting the terms of service.

Closes #37162
This commit is contained in:
Stan Hu 2018-05-29 17:51:30 -07:00
parent d3b39a835f
commit 294ab0fffd
3 changed files with 8 additions and 2 deletions

View File

@ -30,7 +30,7 @@ export default class IssuableForm {
}
this.initAutosave();
this.form.on('submit:success', this.handleSubmit);
this.form.on('submit', this.handleSubmit);
this.form.on('click', '.btn-cancel', this.resetAutosave);
this.initWip();

View File

@ -0,0 +1,5 @@
---
title: Fix local storage not being cleared after creating a new issue
merge_request:
author:
type: fixed

View File

@ -62,7 +62,8 @@ describe 'Users > Terms' do
expect(current_path).to eq(project_issues_path(project))
end
it 'redirects back to the page the user was trying to save' do
# Disabled until https://gitlab.com/gitlab-org/gitlab-ce/issues/37162 is solved properly
xit 'redirects back to the page the user was trying to save' do
visit new_project_issue_path(project)
fill_in :issue_title, with: 'Hello world, a new issue'