Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

A Tip on Saving work item and the IDetailedStatus result

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:

            IDetailedStatus s = wc.save(null);
                      
            if (!s.isOK()) {
           // failure something bad happened
                throw new TeamRepositoryException(s.getException());
            }
Stepping through the Java source with a debugger and looking at the "contents" of that IDetailedStatus showed this message:

CRRTC0298W: The value of the attribute 'Stack Voters' was sent incorrectly. The attribute has been set to it's default value
I 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.



1

1 vote



One answer

Permanent link
Thanks for sharing.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,036

Question asked: Jun 28 '13, 1:29 p.m.

Question was seen: 4,501 times

Last updated: Jul 09 '13, 3:03 p.m.

Confirmation Cancel Confirm