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

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

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.

0 votes



2 answers

Permanent link
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>

0 votes

Comments

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


thanks for your answer.   


Permanent link
>i want only one method for retrieve the values

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

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

Question asked: May 01 '13, 1:32 a.m.

Question was seen: 3,525 times

Last updated: May 02 '13, 8:06 a.m.

Confirmation Cancel Confirm