It's all about the answers!

Ask a question

How could we retrieve all the values (master data) of status, severity and priority fields of IBM Rational Team Concert(RTC) using Java API?


jose s (1122) | asked May 01 '13, 1:32 a.m.
hi all,

 How could we retrieve all the values (master data) of status, severity and priority fields of IBM Rational Team Concert(RTC) using Java API?


thanks in advance.

2 answers



permanent link
sam detweiler (12.5k6195201) | answered May 01 '13, 10:44 a.m.
well, severity and priority are enumerations.. so you can get the list from
(See my sample code at post 3 of https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes)
                           
                                    List<ILiteral> enumerationLiterals = enumeration
                                            .getEnumerationLiterals();

you have to get the states list from the WorkflowInfo object

here is some code from an advisor plugin
<code>
                // get the worker objects
                IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon();
                WorkflowManager wfm = new WorkflowManager(iac);
               
                // reference the right object type (cast)
                IWorkItem workItem = (IWorkItem) auditable;
                // get the workflow this workitem is in, so we can get the labels of the states
                IWorkflowInfo x =wfm.getWorkflowInfo(workItem, monitor);

                if(Debug) System.out.println("the workitem state is "+ workItem.getState2().getStringIdentifier()+ "=" +x.getStateName(workItem.getState2()) );
                // if this workitem is going into resolved state (we accessed 'proposed new' state above
                if(x.getStateName(workItem.getState2()).equalsIgnoreCase(ResolvedState))
</code>

Comments
jose s commented May 02 '13, 12:29 a.m.

i want only one method for retrieve the values.Any method is available for this case.


thanks for your answer.   


permanent link
sam detweiler (12.5k6195201) | answered May 02 '13, 8:06 a.m.
>i want only one method for retrieve the values

sorry, RTC doesn't not provide a data neutral single method.

Your answer


Register or 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.