Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Identify Attachment Selector Field values in Java or REST API

blindbg April 30, 2020

Hello

There is a custom field of type "Issue Attachment Selector Field" on form

It contains references to user selected attachments added to the issue. (not all attachments)

REST GET call to /rest/api/2/issue/MYISSUE-11 returns

...

"customfield_10100": [
"com.atlassian.jira.issue.attachment.Attachment@ffff9558",
"com.atlassian.jira.issue.attachment.Attachment@fcaac25e"
],

...


Same with Java API

@Grab(group='com.atlassian.jira', module='jira-rest-java-client-core', version='5.2.1')
, @Grab(group='com.atlassian.jira', module='jira-rest-java-client-api', version='5.2.1')


How can I match them to real attachment references , defined in the resultset?
... or convert String "Attachment@ffff9558" into Attachment object?

Thank you for any hint, gurus

1 answer

1 accepted

0 votes
Answer accepted
DPKJ
Community Champion
April 30, 2020

@blindbgThis is not standard Jira field and is provided by plugin, 'Email This Issue'.

You need to check with them, because you are current getting Object reference in API and there is no way you can convert that to meaningful data.

Here is documentation of this field - https://metainf.atlassian.net/wiki/spaces/PLUG/pages/66093122/Custom+Fields

blindbg April 30, 2020

Oh... thanks, that is helpful.

Suggest an answer

Log in or Sign up to answer