[messaging][bugfix] Don't convert filter's matchValue to String 64/211864/3
authorPawel Wasowski <p.wasowski2@samsung.com>
Wed, 27 Feb 2019 16:06:45 +0000 (17:06 +0100)
committerPiotr Kosko <p.kosko@samsung.com>
Fri, 18 Oct 2019 11:36:50 +0000 (11:36 +0000)
Due to a conversion of matchValue to String, filters with boolean
matchValues did not match objects.

[Verification] All subtest cases, dealing with boolean attributes,
introduced in TCT in commit
https://review.tizen.org/gerrit/#/c/test/tct/web/api/+/199159/
passed.

This commit has already been reviewed:
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/200661/
Change-Id of the original change was:
I72fc83328e92529455460469c5dbc1aadc6ce07e

Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
Change-Id: Ia8d769b1a9694defdcb403761cff9c2565f5f52b

src/messaging/messaging_api.js

index d46536e..63764e2 100755 (executable)
@@ -39,8 +39,7 @@ function addTypeToFilter_(data) {
 
     if (data instanceof tizen.AttributeFilter) {
         filter.filterType = 'AttributeFilter';
-        //convert to string
-        filter.matchValue = String(filter.matchValue);
+        filter.matchValue = filter.matchValue;
     } else if (data instanceof tizen.AttributeRangeFilter) {
         filter.filterType = 'AttributeRangeFilter';
     } else if (data instanceof tizen.CompositeFilter) {