Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,362
Community Members
 
Community Events
185
Community Groups

Can I get the attachments which are uploaded in the transition using Scriptrunner?

Hi ,

I have a transition screen between 2 statuses, say Testing to Done, and I have attachments field in that screen. I need to get the attachments(one or more) which were uploaded  at the time of transition and clone those attachments to another issue.

As of now , I was able to get all the attachments which were present in that issue(Using Script-runner). But I need to clone only those attachments which are uploaded at the time of transition.

Please help me out.

Thanks and regards,

Sahrudai

2 answers

Hi Sahrudai, 

I have the same situation now. We have a transition between the statuses Development & Cross check and we would like to see the attachments which are uploaded in the status Development and we need to read out those attachments while fill the data in the transition . 

So you mentioned you were able to bring the attachments to the transition screen by using script runner . Please let me know how you configure this?

Hi Venkat,

 

What I meant was, I was able to get the attachments via API in the scriptrunner code, that too all the attachments, not which were added in the particular status.

 

Thanks,

Sahrudai

Hi Sahrudai, thank you for your response. So if we want to get all the attachments in the issue on the transition screen then how do we do that? Could you please guide me to meet my requirement ?

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 12, 2020

Hi Sahrudai,

I can confirm that it is only possible to get all attachments on an issue and not just the ones added in a transition screen.

The reason for this is that Atlassian only provides the Get attachment metadata API located here in order to get all atatchments and ScriptRunner for Jira Cloud can only use the public rest API's which Atlassian provides.

This means all you could do would be to clone all attchments and then make a calls to the  Delete Attachment API here to delete the attachments which are not required.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events