Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type mismatch in CaseStatus.getLabelsForValues #377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pfigel
Copy link

@pfigel pfigel commented Mar 9, 2020

Overview

Fix a type mismatch in CaseStatus.getLabelsForValues

Before

String caseStatus.value is tested for strict equality with statusValue, which may be either String or Integer (e.g. when opening a case via "Go to case" vs. using case filters).

After

String caseStatus.value and statusValue is cast to Integer before comparison.

@tunbola tunbola requested a review from reneolivo March 9, 2020 16:21
This fixes a typing issue in CaseStatus.getLabelsForValues:
caseStatus.value appears to be a string, and statusValue may be either
int or string depending on where it is passed from ("Go to case" vs.
case filter). This casts both values to int before strict comparison.
@pfigel pfigel force-pushed the fix-case-status-value-comparison branch from a52aaa4 to 63f9bd9 Compare March 10, 2020 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant