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

RTC API for working with attachment

I am writing an Advisory to make compulsory the attachments before saving the work item.
When I am using following code:
WorkItemReferences refs = (WorkItemReferences) workItem;
                    List<IReference> test =refs.getReferences(WorkItemEndPoints.ATTACHMENT);
I am getting warning :
Discouraged access: The method getReferences(IEndPointDescriptor) from the type WorkItemReferences is not accessible due to restriction on required library C:\RTC601DEV\installs\rtc-sdk\plugins\com.ibm.team.workitem.common_3.2.500.v20151021_2014.jar


0 votes


Accepted answer

Permanent link
https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ and https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/
Ralph Schoon selected this answer as the correct answer

0 votes

Comments

Hello Ralph Thanks for the links  ..
I got he attachments like :
List<IReference>  relatedRefs = ((ISaveParameter) data).getNewReferences().getReferences(WorkItemEndPoints.ATTACHMENT);          System.out.println("Links = "+ relatedRefs.size());
for (IReference link : relatedRefs)
{
        System.out.println("Link type is +" + link.getLink().getLinkTypeId());

  }

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
× 10,950

Question asked: Aug 21 '16, 1:59 a.m.

Question was seen: 3,064 times

Last updated: Aug 23 '16, 3:15 p.m.

Confirmation Cancel Confirm