From 0172b00e6e83e35134143c4150ed35e074c26123 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 25 2019 16:11:16 +0000 Subject: Inform the user when changing the assignee failed We had an issue where the user asking to take or drop assignee on a ticket had no feedback if the ajax call failed. This commit fixes that by reporting an error to the user. Fixes https://pagure.io/pagure/issue/3996 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index baa1465..a36f0e6 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -983,7 +983,9 @@ function take_issue(){ $('#assignee').val("{{ g.fas_user.username }}"); setup_btn_take_drop(); } - ) + ).fail(function() { + alert( "An error occured, could not assign this ticket to you." ); + }) return false; } {% endif %} @@ -1005,7 +1007,9 @@ function drop_issue(){ $('#assignee').val(""); setup_btn_take_drop(); } - ) + ).fail(function() { + alert( "An error occured, could not drop the current assignee." ); + }) return false; } {% endif %}