Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Smart Attachment for Jira: how to get files with versions in a groovy script?

Hello,

I have a groovy script which finds attached files in the issue by category and uploads them to different folders on SharePoint.

We're using method getAttachments from package com.stiltsoft.jira.attachcategory.facade.entity.issue to get the files from an each category:

attachmentCategories.getCategories().each { category ->
List attachments = category.getAttachments(false);

 

but seems like the method does not work if the file has versions: in this case the method returns empty list.

Is there a way to get attachments, that have versions? I do not need all the versions, it is enough to get the last one.

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

429 views 2 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you