Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I know that getting detail information from a issue(Item) is
in CLI
$ im view issue 2
in Java API
Command cmd = new Command(Command.IM, "viewissue"); cmd.addSelection("2");
In result, I get the fields of the issue(item) that I selected.
Shared Attachments: shared.txt Text Attachments: text.txt Attachments: attach.txt
Not just names of the attachments, I want to know the detailed information of for each attachments (text.txt, attach.txt, share.txt...) such as created by and created time.
I know that the detailed information of each attachments is shown in the GUI client when view detail of the item.
How can I retrieve those information by CLI and Java API?
Solved! Go to Solution.
Try using the option "showAttachmentDetails".
On the CLI, the output is like:
MKSImg8987741183544506197.png (5567 bytes) awalsh 2-May-2016 9:58:41 PM Attachment added automatically by rich content image/png bfecae030292b268a8f54c9d67454ebe
In the API, you will get:
Field: Name = Text Attachments Data Type = mksItemList ItemList: Item: Id = MKSImg8987741183544506197.png Context = 2892 Model Type = im.Attachment Field: Name = FileName Data Type = wchar_t * Value = MKSImg8987741183544506197.png Field: Name = FileSize Data Type = int Value = 5567 Field: Name = CreatedBy Data Type = wchar_t * Value = awalsh Field: Name = DateAdded Data Type = wchar_t * Value = 2-May-2016 3:58:41 PM Field: Name = Summary Data Type = wchar_t * Value = Attachment added automatically by rich content Field: Name = ContentType Data Type = wchar_t * Value = image/png Field: Name = Checksum Data Type = wchar_t * Value = bfecae030292b268a8f54c9d67454ebe Field: Name = AttachmentID Data Type = int Value = 46
Try using the option "showAttachmentDetails".
On the CLI, the output is like:
MKSImg8987741183544506197.png (5567 bytes) awalsh 2-May-2016 9:58:41 PM Attachment added automatically by rich content image/png bfecae030292b268a8f54c9d67454ebe
In the API, you will get:
Field: Name = Text Attachments Data Type = mksItemList ItemList: Item: Id = MKSImg8987741183544506197.png Context = 2892 Model Type = im.Attachment Field: Name = FileName Data Type = wchar_t * Value = MKSImg8987741183544506197.png Field: Name = FileSize Data Type = int Value = 5567 Field: Name = CreatedBy Data Type = wchar_t * Value = awalsh Field: Name = DateAdded Data Type = wchar_t * Value = 2-May-2016 3:58:41 PM Field: Name = Summary Data Type = wchar_t * Value = Attachment added automatically by rich content Field: Name = ContentType Data Type = wchar_t * Value = image/png Field: Name = Checksum Data Type = wchar_t * Value = bfecae030292b268a8f54c9d67454ebe Field: Name = AttachmentID Data Type = int Value = 46
Thank you! That works for me.