Redmine - Defect #21579
The cancel operation in the issue edit mode doesn't work
2015-12-21 19:11 - Nils Grimm

ステータス:

Closed

開始日:

優先度:

Normal

期日:担当者:

Jean-Philippe Lang

進捗率:0%

カテゴリ:

Issues

予定工数:

0.00時間対象バージョン:3.4.0

Resolution:

Fixed

Affected version:

3.2.0

説明
Since the upgrade to the 3.2.0 the cancel operation in the edit mode of an issue is simply doing nothing.
You can click on it but the GUI doesn't react.
関連するチケット:
次のチケットが重複 Redmine - Defect #24756: Clicking Cancel in Iss...

Closed

関係しているリビジョン
リビジョン 16361 - 2017-03-03 18:21 - Jean-Philippe Lang
The cancel operation in the issue edit mode doesn't work (#21579).
Patch by Marius BALTEANU.

履歴#1 - 2015-12-21 23:29 - Sven Culley
Could you provide more details regarding this issue?
I am using Google Chrome and everything works fine.
#2 - 2015-12-21 23:30 - Go MAEDA- ステータス を New から Needs feedback に変更#3 - 2016-01-05 19:11 - Nils Grimm
I tested it again after Christmas and can't reproduce it any more.
I'm sorry, please close the ticket.
Thank and a happy new year.
#4 - 2016-01-06 05:54 - Go MAEDA- ステータス を Needs feedback から Closed に変更- 優先度 を High から Normal に変更- Resolution を Invalid にセット
Thanks for your feedback. Closing.
Have a great new year.
#5 - 2016-07-21 16:06 - Sonia ZhHello,
I have the cancel operation in the edit mode of an issue as well but I don't know if this is the same bug you had.
It does not happen all the time:
if you are displaying the edit form through the edit or update method in the issues̲controller, your cancel button won't work.
if the edit form came from a render through another view or action such as show method in the issues̲controller, then your cancel button willwork.
In another word, here are the steps to reproduce the 'bug':Lets consider your issue id: #123
go to: http://yourRedmine.com/issues/123/edit

2024-10-11

1/3

the cancel operation won't do anything
I have corrected it but I don't know it this is a good practice... If you have another way, please share it ^^I replace in app/views/issues/̲edit.html.erb:<%=

f.hidden̲field :lock̲version %>hidden̲field̲tag<%='last̲journal̲id', params[:last̲journal̲id] ¦¦ @issue.last̲journal̲id %><%= submit̲tag l(:button̲submit) %><%= preview̲link preview̲edit̲issue̲path(:project̲id> @project,=:id => @issue), 'issue-form' %>¦ <%= link̲to l(:button̲cancel), {}, :onclick> "$('#update').hide();=return false;"
%>
BY:

<%=

f.hidden̲field :lock̲version %>hidden̲field̲tag<%='last̲journal̲id', params[:last̲journal̲id] ¦¦ @issue.last̲journal̲id %><%= submit̲tag l(:button̲submit) %><%= preview̲link preview̲edit̲issue̲path(:project̲id> @project,=:id => @issue), 'issue-form' %>¦<% ifparams[:action] == "show" %><%= link̲to l(:button̲cancel), {}, :onclick> "$('#update').hide();=return false;"%><% else%><%= link̲to l(:button̲cancel), issue̲path(id: @issue.id) %><% end %>#6 - 2016-08-20 04:47 - Toshi MARUYAMA- ステータス を Closed から Confirmed に変更- Resolution を削除 (Invalid)sonia zh wrote:go to: http://yourRedmine.com/issues/123/edit

I can confirm from bulk edit.
#7 - 2017-01-04 16:10 - Go MAEDA- 次のチケットが重複 Defect #24756: Clicking Cancel in Issue edit page nothing happens. を追加#8 - 2017-01-04 16:15 - Go MAEDA
Steps to reproduce from #24756:
From the issue list,
Select one issue row,
Right click and Edit
In the edit page of a single issue, Click Cancel. Nothing happens.

#9 - 2017-02-09 07:09 - Charlene Chen
It is easy to fix this.
What I did was adding a new js function to replace the one used in /issues/̲edit.html.erb<%= link̲to l(:button̲cancel), {}, :onclick => "buttonCancel(event);

returnfalse;"%><%= javascript̲tag do %>function buttonCancel(event) {if($('#update').length){$('#update').hide();} else {var url = $(location).attr('href');
var redirect = url.substr(url.lastIndexOf('/')+1)$(location).attr('href', redirect);}}<% end %>2024-10-11=='edit'?

url.substr(0,url.lastIndexOf('/'))

:url;

2/3

#10 - 2017-02-19 14:24 - Marius B

LTEANU- ファイル rm̲21579̲fix̲cancel̲edit̲link̲for̲issues.patch を追加
Here is a patch with tests that fixes this issue.
#11 - 2017-02-20 13:56 - Go MAEDA- 対象バージョン を 3.4.0 にセット
The patch submitted by Marius BALTEANU works fine for me. Thanks for fixing the problem.
Setting target version to 3.4.0.
#12 - 2017-03-03 18:21 - Jean-Philippe Lang- ステータス を Confirmed から Closed に変更- 担当者 を Jean-Philippe Lang にセット
- Resolution を Fixed にセット
Patch committed, thanks.

ファイル
rm̲21579̲fix̲cancel̲edit̲link̲for̲issues.patch

2024-10-11

1.81 KB

2017-02-19

Marius B

3/3

LTEANU