Closed Bug 397556 Opened 18 years ago Closed 18 years ago

TestCaseRun.lookup_status_{name_by_id,id_by_name} seem to have reversed error return behavior

Categories

(Testopia :: API, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nparrish, Assigned: gregaryh)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5 Build Identifier: 1.3 originally API doc indicated that name_by_id returned empty string '' on failure to resolve, and id_by_name returned 0, which is reasonably intuitive. however, on investigation, the behavior is the opposite: >>> params[0]="PASS" >>> result = client.execute("TestCaseRun.lookup_status_id_by_name", params) >>> result '' >>> params[0]=99 >>> result = client.execute("TestCaseRun.lookup_status_name_by_id", params) >>> result 0 I have corrected the API docs on the wiki to reflect this reality, but per ghendricks am filing a bug. Reproducible: Always Steps to Reproduce: 1. 2. 3.
To make things more consistent, all lookups now return undef if no match was found as 0 can be a valid value in certain places.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.