Implement multi value (status) filtering for getting activity details #381

Merged
tcdlpds merged 3 commits from Gimhan-minion/device-mgt-core:act-fil into master 5 months ago
There is no content yet.
Gimhan-minion force-pushed act-fil from bf383f6ba0 to 99ddde26a6 6 months ago
charithag added 1 commit 6 months ago
charithag reviewed 6 months ago
sql.append("AND STATUS = ? ");
if (activityPaginationRequest.getStatuses() != null && !activityPaginationRequest.getStatuses().isEmpty()) {
sql.append("AND STATUS IN (");
for (int i = 0; i < activityPaginationRequest.getStatuses().size() - 1; i++) {
Owner

Incorrect logic. If stauses count is 1, activityPaginationRequest.getStatuses().size() - 1 = 0, the boundary condition get false and no statues will add to where in clause. Further this will omit last status all the time if statuses count is grater than 1.

Incorrect logic. If stauses count is 1, activityPaginationRequest.getStatuses().size() - 1 = 0, the boundary condition get false and no statues will add to where in clause. Further this will omit last status all the time if statuses count is grater than 1.
Gimhan-minion marked this conversation as resolved
charithag requested changes 6 months ago
charithag left a comment
Owner

Check review comment and fix it in all applicable places

Check review comment and fix it in all applicable places
charithag added 1 commit 5 months ago
Gimhan-minion requested review from charithag 5 months ago
charithag approved these changes 5 months ago
tcdlpds merged commit 64189a400d into master 5 months ago
charithag deleted branch act-fil 5 months ago

Reviewers

charithag approved these changes 5 months ago
The pull request has been merged as 64189a400d.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#381
Loading…
There is no content yet.