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

Retirement warn in days only #18637

Merged
merged 2 commits into from
Apr 22, 2019

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Apr 8, 2019

Since we only support days for retirement_warn, the PR that added the hour granularity needed to have those fields removed and remaining fields needed to be changed to make sure that we're staying true to storing an int in that field as a count of days like the UI sets.

Screen Shot 2019-04-08 at 2 10 58 PM

So all these fields should set an int that reflects days before retirement.

Fix for #18618.
https://bugzilla.redhat.com/show_bug.cgi?id=1695219 is the bz.

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 8, 2019

@miq-bot assign @tinaafitz
@miq-bot add_label bug
No idea what you all want to do for backporting, any ideas, Tina?

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 8, 2019

@miq-bot add_reviewer @jrafanie

@miq-bot miq-bot requested a review from jrafanie April 8, 2019 18:22
@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 9, 2019

hey @eclarizio could you please 👀

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change but otherwise I think we're good here 👍

app/models/service/dialog_properties/retirement.rb Outdated Show resolved Hide resolved
@d-m-u d-m-u force-pushed the retirement_warn_in_days_only branch from ea7e036 to 6f9461c Compare April 9, 2019 18:24
@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 18, 2019

anyone want to merge this?

@d-m-u d-m-u force-pushed the retirement_warn_in_days_only branch from 6f9461c to e330ef6 Compare April 22, 2019 11:43
@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 22, 2019

@gmcculloug hi, could you please look at this again?

@@ -51,7 +48,10 @@ def retire_on_date=(value)

def retirement_warning
warn_value = parse_retirement_warn
@attributes[:retirement_warn] = warn_value if warn_value
if warn_value
days_between_warn_and_retirement = (@attributes[:retires_on] - warn_value) / 1.day
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d-m-u Did you have thoughts on adding to_i to the first part of the equation as described in #18637 (review) ?

@d-m-u d-m-u force-pushed the retirement_warn_in_days_only branch from e330ef6 to 3320319 Compare April 22, 2019 13:32
@miq-bot
Copy link
Member

miq-bot commented Apr 22, 2019

Checked commits d-m-u/manageiq@0b5d323~...3320319 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@gmcculloug gmcculloug merged commit d5f2527 into ManageIQ:master Apr 22, 2019
@gmcculloug gmcculloug added this to the Sprint 110 Ending Apr 29, 2019 milestone Apr 22, 2019
@d-m-u d-m-u deleted the retirement_warn_in_days_only branch April 22, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants