-
Notifications
You must be signed in to change notification settings - Fork 482
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
Fix last_enrolled_at
for macOS devices when re-enrolling to MDM
#20173
Conversation
@@ -770,30 +770,37 @@ func updateMDMAppleHostDB( | |||
) error { | |||
refetchRequested, lastEnrolledAt := mdmHostEnrollFields(mdmHost) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would make things easier to maintain to split up this abstraction and calculate these two values separately when needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added changes file
changes/20059-fix-last_enrolled_at
documenting the fix - Fixed
last_enrolled_at
field update for macOS hosts re-enrolling via MDM - Updated tests to cover the new functionality
- Conducted manual QA for the changes
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
@@ -0,0 +1 @@ | |||
* Fixed bug that set `Added to Fleet` to `Never` after macOS hosts re-enrolled to Fleet via MDM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ info: Documented the fix for the last_enrolled_at
field issue for macOS re-enrollment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm assuming I was requested by mistake? |
Maybe because of the change to |
…0173) - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [X] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) - [X] If database migrations are included, checked table schema to confirm autoupdate - For database migrations: - [X] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [X] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [X] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). - [X] Added/updated tests - [X] Manual QA for all new/changed functionality
#20059
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.
SELECT *
is avoided, SQL injection is prevented (using placeholders for values in statements)COLLATE utf8mb4_unicode_ci
).