Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2.19
-
None
-
-
Empty show more show less
-
Nucleus 12
-
2
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 / update task.
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
Checklists
Acceptance criteria
Attachments
Issue Links
- caused by
-
ADMINCTR-1 Migrate user preferences dialog to new framework
-
- Closed
-
1.
|
Provide PR - Convert blank value fallbacks to default timezone (instead of incorrect GMT one) |
|
Completed | Adam Siska |
2.
|
Code review |
|
Closed | Antonín Juran |
3.
|
Preint QA |
|
Closed | Quach Hao Thien |
4.
|
Integrate |
|
Completed | Adam Siska |
5.
|
QA |
|
Completed | Antonín Juran |
6.
|
Refix TimeZoneSelectFieldSupportTest#emptyZoneIdFallbacksToDefaultTimeZone() unit test |
|
Completed | Adam Siska |