[ADMINCTR-70] Default timezone overwritten with GMT timezone when editing user profile Created: 23/May/22 Updated: 20/Jul/22 Resolved: 14/Jun/22 |
|
| Status: | Closed |
| Project: | Admincentral |
| Component/s: | None |
| Affects Version/s: | 6.2.19 |
| Fix Version/s: | 6.2.20 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Jonathan Ayala | Assignee: | Adam Siska |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 3.5h | Time Spent: | 3.5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||||||||||||
| Epic Link: | Nucleus Quality Maintenance | |||||||||||||||||||||||||||||||||||
| Sprint: | Nucleus 12 | |||||||||||||||||||||||||||||||||||
| Story Points: | 2 | |||||||||||||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||||||||||||
| Description |
|
When editing a user without an explicitly configured timezone (defaults to server timezone), this one is overridden with GMT timezone when saving the user profile dialog.
Workarounds: A. Use the old dialog (revert this change) B. or remove empty timezone properties from users via a script scripts.removeEmptyUserTimezones.xml import info.magnolia.context.MgnlContext import info.magnolia.jcr.util.PropertyUtil import javax.jcr.Node import javax.jcr.Property import javax.jcr.query.Query session = MgnlContext.getJCRSession("users") session.getWorkspace().getQueryManager() .createQuery("SELECT * FROM [mgnl:user] AS user WHERE ISDESCENDANTNODE('/admin') AND user.timezone IS NOT NULL", Query.JCR_SQL2) .execute() .nodes .forEachRemaining((Node node) -> { Property property = PropertyUtil.getPropertyOrNull(node, "timezone") if (property != null) { println "Removing " + property property.remove() } }) //session.save() //uncomment this when satisfied with list of properties to remove
|
| Comments |
| Comment by Roman Kovařík [ 23/May/22 ] |
|
Discovery: The new implementation takes the old default user timezone value (empty string) and converts it to GMT Proposed solutions: A. Filter blank value fallbacks to default timezone when presenting the timezone value B. Or remove the empty timezone properties by an update task as suggested by the customer (this would not fix existing bootstrap files though)
|
| Comment by Adam Jones [ 01/Jun/22 ] |
|
Don't forget to add test coverage on affected area to protect against regression in future. |
| Comment by Adam Jones [ 01/Jun/22 ] |
|
We are going with option A. |