From b9a1efad38c39e66a1c6e7aa9cd7bf96b847dcb1 Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Wed, 1 Mar 2017 17:42:10 -0500 Subject: [PATCH] Enable Add button when copying an existing report. Prefixed report name with "Copy of" to enable Add button when copying a report https://bugzilla.redhat.com/show_bug.cgi?id=1428132 --- app/controllers/report_controller/reports/editor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/report_controller/reports/editor.rb b/app/controllers/report_controller/reports/editor.rb index 9d6124178a5..db68f8fe049 100644 --- a/app/controllers/report_controller/reports/editor.rb +++ b/app/controllers/report_controller/reports/editor.rb @@ -1391,6 +1391,7 @@ def set_form_vars end @edit[:current] = ["copy", "new"].include?(params[:action]) ? {} : copy_hash(@edit[:new]) + @edit[:new][:name] = "Copy of #{@rpt.name}" if params[:pressed] == "miq_report_copy" # For trend reports, check for percent field chosen if @rpt.db && @rpt.db == TREND_MODEL &&