It's all about the answers!

Ask a question

RTC API for working with attachment


Girish Chandra P (853246) | asked Aug 21 '16, 1:59 a.m.
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


Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Aug 22 '16, 2:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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

Comments
Girish Chandra P commented Aug 23 '16, 3:15 p.m.

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