Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed
- [Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record](https://github.com/ballerina-platform/ballerina-library/issues/8730)

## [3.8.2] - 2024-10-01

### Fixed
- [Application written with `ballerina/asb` connector gives a conflicting JAR warning with `netty-buffer` and `jackson-annotations`](https://github.com/ballerina-platform/ballerina-library/issues/7061)

## [3.8.1] - 2024-09-30
Expand Down
20 changes: 13 additions & 7 deletions native/src/main/java/io/ballerina/lib/asb/util/ASBUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,19 @@ public static SubscriptionProperties getUpdatedSubscriptionPropertiesFromBObject
*/
public static RuleProperties getUpdatedRulePropertiesFromBObject(BMap<BString, Object> ruleConfig,
RuleProperties ruleProp) {
if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_ACTION)) {
ruleProp.setAction(new SqlRuleAction(
ruleConfig.getStringValue(ASBConstants.RECORD_FIELD_ACTION).getValue()));
}
if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_FILTER)) {
ruleProp.setFilter(new SqlRuleFilter(
ruleConfig.getStringValue(ASBConstants.RECORD_FIELD_FILTER).getValue()));
if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_SQL_RULE)) {
if (ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).containsKey(
ASBConstants.RECORD_FIELD_ACTION)) {
ruleProp.setAction(new SqlRuleAction(
ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).getStringValue(
ASBConstants.RECORD_FIELD_ACTION).getValue()));
}
if (ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).containsKey(
ASBConstants.RECORD_FIELD_FILTER)) {
ruleProp.setFilter(new SqlRuleFilter(
ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).getStringValue(
ASBConstants.RECORD_FIELD_FILTER).getValue()));
}
}
return ruleProp;
}
Expand Down
Loading