uscis-case-statistics icon indicating copy to clipboard operation
uscis-case-statistics copied to clipboard

getLastCaseNumber

Open thegruyere opened this issue 3 years ago • 0 comments

getLastCaseNumber returns sometimes the wrong case number. The issue is that the function assumes that if it can't get a valid result for 5 consecutive cases, then that must be the last possible case number. That is a wrong assumption.

For example: getLastCaseNumber("SRC", 21, 314, 5, 0) returns 31 because SRC2131450032 -> SRC2131450037 don't exist. However there are valid case numbers higher than SRC2131450031. The next valid receipt case number is SRC2131450042 which is ignored because the last case number was incorrectly assumed to be 31.

thegruyere avatar Dec 09 '21 00:12 thegruyere