Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the updated widget timestamp #19405

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Oct 16, 2019

So the comment on widget content generation says that we're forcing the widget timestamp to change every time we run find_or_build_contents_for_user.

But we're not saving it anyway so I don't think it's updating.

# Force updated timestamp to change when saved even if the new contents are the same

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 16, 2019

DialogField.first.updated_at
 => Tue, 10 Sep 2019 12:40:11 UTC +00:00 
2.5.3 :014 > DialogField.first.updated_at = Time.now
 => 2019-10-16 08:48:55 -0400 
2.5.3 :015 > DialogField.first
 => #<DialogFieldTextBox id: 22, name: "text_box_1", description: "", type: "DialogFieldTextBox", data_type: nil, notes: "I am a text box and I have a description here foo/...", notes_display: "show", display: "edit", display_method: nil, display_method_options: {}, required: true, required_method: nil, required_method_options: {}, default_value: "", values: nil, values_method: nil, values_method_options: {}, options: {:protected=>false}, created_at: "2019-09-10 12:40:11", updated_at: "2019-09-10 12:40:11", label: "Text Box", dialog_group_id: 6, position: 0, validator_type: "f", validator_rule: nil, reconfigurable: false, dynamic: false, show_refresh_button: false, load_values_on_init: true, read_only: false, auto_refresh: false, trigger_auto_refresh: false, visible: true> 

@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 16, 2019

@miq-bot add_label bug
@miq-bot assign @bdunne

@chessbyte
Copy link
Member

@d-m-u any tests to update to reflect this code change?

@d-m-u d-m-u changed the title Save the updated widget timestamp [WIP] Save the updated widget timestamp Oct 16, 2019
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 16, 2019

yup, marking wip cause it needs a test

@miq-bot miq-bot added the wip label Oct 16, 2019
@d-m-u d-m-u force-pushed the save_widget_timestamp branch from 265cd46 to c7744f6 Compare October 17, 2019 11:41
@d-m-u d-m-u changed the title [WIP] Save the updated widget timestamp Save the updated widget timestamp Oct 17, 2019
@d-m-u
Copy link
Contributor Author

d-m-u commented Oct 17, 2019

@miq-bot remove_label wip

@miq-bot
Copy link
Member

miq-bot commented Oct 17, 2019

Checked commit d-m-u@c7744f6 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@miq-bot miq-bot removed the wip label Oct 17, 2019
@bdunne bdunne merged commit 6ef4fa6 into ManageIQ:master Oct 17, 2019
@bdunne bdunne added this to the Sprint 123 Ending Oct 28, 2019 milestone Oct 17, 2019
@bdunne bdunne added the core label Oct 17, 2019
@kbrock
Copy link
Member

kbrock commented Oct 21, 2019

Since this is find_or_build I wasn't expecting the internal save. Especially since this has a save! after both of the calls into here.

@d-m-u d-m-u deleted the save_widget_timestamp branch October 26, 2020 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants