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
TAGS
atlassian, jira cloud certification, managing jira projects, jira project administration, jira cloud exam, atlassian certification, agile project management, jira workflows, jira permissions, jira training, jira cloud skills, atlassian learning

Become a Certified Jira Service Project Expert 🦸🏻‍♂️

Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.

Get Certified! ✍️
AUG Leaders

Atlassian Community Events