A Tip on Saving work item and the IDetailedStatus result
![](http://jazz.net/_images/myphoto/197766eae5cac1218c9c4c8ca5d5ca58.jpg)
This isn't a question or issue, just a nugget of "bitten by" wisdom. Situation: I have a Java RTC Client application that is a go-between that will create / update RTC work items in response records created in another system. Users of this special client were finding that RTC work items were being created, but the necessary back-link to the other system were not being set, so new work items were getting created ....
Turns out the idiom that one will find by searching jazz.net for 'IDetailedStatus' is this:
if (!s.isOK() && ! s.matches(DetailedStatus.INFO | DetailedStatus.Warning ) ) {
....
}
Works like a champ.
Turns out the idiom that one will find by searching jazz.net for 'IDetailedStatus' is this:
IDetailedStatus s = wc.save(null);Stepping through the Java source with a debugger and looking at the "contents" of that IDetailedStatus showed this message:
if (!s.isOK()) {
// failure something bad happened
throw new TeamRepositoryException(s.getException());
}
CRRTC0298W: The value of the attribute 'Stack Voters' was sent incorrectly. The attribute has been set to it's default valueI did some research on the IDetailedStatus (DetailedStatus and the eclipse Status) javadocs. For this application any result "higher" than WARNING should trigger the failure. Thus I changed the if statement to this:
if (!s.isOK() && ! s.matches(DetailedStatus.INFO | DetailedStatus.Warning ) ) {
....
}
Works like a champ.