Created attachment 1591432 [details] Server error when trying to edit the Schedule Description of problem: Internal server error occurs while editing Schedule with EVM Group or Tenant as Object Attribute Type. For other types, everything works well. Version-Release number of selected component (if applicable): 5.10, 5.11 How reproducible: 100% Steps to Reproduce: 1. Go to Configuration > Settings accordion > Schedules 2. Choose Configuration > Add a new Schedule 3. For Action, choose Automation Tasks 4. For Object Attribute Type, choose EVM Group or Tenant 5. Save the schedule 6. Configuration > Edit this Schedule Actual results: => [----] I, [2019-07-17T15:56:35.346480 #19795:2ad8f888c54c] INFO -- : Started GET "/ops/schedule_form_fields/121" for ::1 at 2019-07-17 15:56:35 +0200 [----] I, [2019-07-17T15:56:35.402769 #19795:2ad8f888c54c] INFO -- : Processing by OpsController#schedule_form_fields as HTML [----] I, [2019-07-17T15:56:35.402952 #19795:2ad8f888c54c] INFO -- : Parameters: {"id"=>"121"} [----] F, [2019-07-17T15:56:35.841908 #19795:2ad8f888c54c] FATAL -- : Error caught: [ActiveRecord::StatementInvalid] PG::UndefinedColumn: ERROR: column "name" does not exist LINE 1: SELECT "miq_groups"."id", "name" FROM "miq_groups" ^ : SELECT "miq_groups"."id", "name" FROM "miq_groups" Expected results: No error and being able to edit and save the changes for the schedule without any problems. Additional info: This bug is reproducible only in 5.11, but the fix is missing also in 5.10 for sure. It is not reproducible in 5.10 because even creating such a schedule is not working there (but this is already fixed for 5.11: https://bugzilla.redhat.com/show_bug.cgi?id=1686762 and unfortunately, it was not fixed also for editing such schedules with that BZ). I think that this is not a regression, this must have never worked before. This is the issue regarding choosing Group or Tenant from the drop down, not regarding editing some item so I think there are more drop downs in different places which might be affected by the same issue.
https://github.com/ManageIQ/manageiq-ui-classic/pull/5826
Just a note that For Tenant type (step 4 from steps to reproduce), there is a different error: [----] I, [2019-07-17T18:10:07.284516 #25163:2ad562fb009c] INFO -- : Started GET "/ops/schedule_form_fields/119" for ::1 at 2019-07-17 18:10:07 +0200 [----] I, [2019-07-17T18:10:07.325345 #25163:2ad562fb009c] INFO -- : Processing by OpsController#schedule_form_fields as HTML [----] I, [2019-07-17T18:10:07.325499 #25163:2ad562fb009c] INFO -- : Parameters: {"id"=>"119"} [----] F, [2019-07-17T18:10:07.876950 #25163:2ad562fb009c] FATAL -- : Error caught: [ActiveModel::MissingAttributeError] missing attribute: use_config_for_attributes
The same root cause exists for both errors, and that both will be resolved via this ticket.
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/f64ebdbd4acc187a9a587fc436d6a3963019e346 commit f64ebdbd4acc187a9a587fc436d6a3963019e346 Author: Hilda Stastna <hstastna> AuthorDate: Wed Jul 17 11:56:11 2019 -0400 Commit: Hilda Stastna <hstastna> CommitDate: Wed Jul 17 11:56:11 2019 -0400 Make editing existing schedule with EVM Group/Tenant option work Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1730750 Fix the error by using columns_for_klass method for proper choosing columns for setting appropriate targets. Small refactoring for setting targets. app/controllers/ops_controller/settings/automate_schedules.rb | 15 +- 1 file changed, 7 insertions(+), 8 deletions(-)
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk: https://github.com/ManageIQ/manageiq-ui-classic/commit/3c3129b408b334a9fadca666877b645b39890e9e commit 3c3129b408b334a9fadca666877b645b39890e9e Author: Harpreet Kataria <hkataria> AuthorDate: Tue Jul 30 16:29:30 2019 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Tue Jul 30 16:29:30 2019 -0400 Merge pull request #5826 from hstastna/Internal_server_error_schedule_edit Make editing schedule with EVM Group/Tenant type work (cherry picked from commit ecd4374ce69f9a171150b90a9b763f7934e7b4d2) https://bugzilla.redhat.com/show_bug.cgi?id=1730750 app/controllers/ops_controller/settings/automate_schedules.rb | 15 +- spec/controllers/ops_controller/settings/automate_schedules_spec.rb | 40 +- 2 files changed, 39 insertions(+), 16 deletions(-)
This ended in error in 5.11.0.17 and 5.11.0.18 is fixed