Check if attachment is null in javascript
Chen Ben ezra (41●4●27)
| asked Dec 10 '15, 5:44 a.m.
edited Dec 10 '15, 7:01 a.m. by Ralph Schoon (63.6k●3●36●46) Hi ,
I created a new workitem. In the editor presentation i defined attachments under the tab links , the attachment ID is: com.ibm.team.workitem.presentation.attachments I want to create a java script that will check if the attachment is null or contain any value (I don't care which value it contain). Is it possible ? (According to https://jazz.net/forum/questions/157309/how-to-get-attachment-file-name- of-a-work-item-in-a-customized-attribute , you can't access the attachments collection from JavaScript) If it's possible in java script , how can i do it ?
BR, Chen |
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Dec 10 '15, 5:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For all I know you can not access attachments in JavaScript. Carefully read the description of what data you can access in JavaScript. You basically have access to specific work item attributes and attachments are not an attribute, really.
Chen Ben ezra selected this answer as the correct answer
|
One other answer
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.