[ https://issues.apache.org/jira/browse/UNOMI-747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevan Jahanshahi updated UNOMI-747: ----------------------------------- Description: The migration to Unomi 2.0.0 can fail during event reindexation: {code:java} /* Handle login events */ if ('login' == ctx._source.eventType) { /* Look for empty scope */ if (ctx._source.scope == '') { ctx._source.put('scope', 'systemsite'); ctx._source.source.put('scope', 'systemsite'); ctx._source.target.put('scope', 'systemsite'); } } {code} This piece of code is trying to set missing scope on login events. But some login event may not have source or target, and it will break the migration process. (UNOMI-644) Missing null check on: * ctx._source.source * ctx._source.target was: The migration to Unomi 2.0.0 can fail during event reindexation: {code:java} /* Handle login events */ if ('login' == ctx._source.eventType) { /* Look for empty scope */ if (ctx._source.scope == '') { ctx._source.put('scope', 'systemsite'); ctx._source.source.put('scope', 'systemsite'); ctx._source.target.put('scope', 'systemsite'); } } {code} This piece of code is trying to set missing scope on login events. But some login event may not have source or target, and it will break the migration process. (UNOMI-644) > Migration can fail if some data set contains login events that doesn't have > .source or .target > ---------------------------------------------------------------------------------------------- > > Key: UNOMI-747 > URL: https://issues.apache.org/jira/browse/UNOMI-747 > Project: Apache Unomi > Issue Type: Bug > Affects Versions: unomi-2.0.0 > Reporter: Kevan Jahanshahi > Priority: Major > > The migration to Unomi 2.0.0 can fail during event reindexation: > {code:java} > /* Handle login events */ > if ('login' == ctx._source.eventType) { > /* Look for empty scope */ > if (ctx._source.scope == '') { > ctx._source.put('scope', 'systemsite'); > ctx._source.source.put('scope', 'systemsite'); > ctx._source.target.put('scope', 'systemsite'); > } > } {code} > This piece of code is trying to set missing scope on login events. > But some login event may not have source or target, and it will break the > migration process. (UNOMI-644) > Missing null check on: > * ctx._source.source > * ctx._source.target -- This message was sent by Atlassian Jira (v8.20.10#820010)