Repository navigation
fix: Order event consistent way [DHIS2-20814] - #173
Conversation
a5043d4 to
4a6ee83
Compare
4a6ee83 to
01944c7
Compare
vgarciabnz
left a comment
There was a problem hiding this comment.
The function orderEvents() is not exposed in the JS artifact. This method uses RuleEvent, which is not exposed either, so this function cannot be annotated with @JsExport directly. It would need a different function for JS.
| val dataValues: List<RuleDataValue>, | ||
| ) | ||
| ): Comparable<RuleEvent> { | ||
| val resolvedCreatedDate get() = (createdAtClientDate ?: createdDate).instant |
There was a problem hiding this comment.
This variable name looks like a name that could be internal. If you want to make it internal, you can add the modifier internal at the start of the line.
zubaira
left a comment
There was a problem hiding this comment.
Will it also order scheduled events ? ( events when eventDate is null )
EventDate cannot be null in |
RuleEvent.eventDatetype fromRuleInstanttoRuleLocalDateto correctly model event dates as calendar dates rather than timestampscreatedAtClientDatefield toRuleEventComparable<RuleEvent>to provide consistent event ordering: primary sort byeventDate, secondary sort bycreatedAtClientDate(falling back tocreatedDate)RuleEngine.order()API method for consumers to sort eventsBreaking changes
RuleEvent.eventDateis nowRuleLocalDateinstead ofRuleInstantRuleEventconstructor has a new required fieldcreatedAtClientDate: RuleInstant?