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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Jira REST API - Attach file at the same time as creating an issue - Can it be done?

I have a demo of issue collector setup and working. But some of the limitations - like the cascading select list - have me considering the REST API. We definitely want users to be able to submit attachments when they create issues. Our current production solution doesn't allow them and it's a big part of why I started working on issue collector.

I've been researching the REST API and what I'm finding, so far, seems to be that I'd have to create the issue first and then attach the file.

Is that still the current behavior?

1 answer

0 votes
Thomas Deiler Community Leader Feb 07, 2020

Dear @Jacob Watts ,

so it is. The reason is simple. Creating an issue required posting JSON payload. Adding an attachment required posting a MultiPartMime. Both the same time is not possible at the moment.

So long

Thomas

Thank you @Thomas Deiler 

Thats a pretty big limitation.

How hard would it be to have backend code create the ticket. Then use the returned ticket ID(I believe I read it can return that upon ticket creation) and then use that ID to attach a file all with the same submit button press?

Is there existing code anyone has written to do something like this?

Thomas Deiler Community Leader Feb 07, 2020

Dear @Jacob Watts ,

it's not a big deal. When creating the issue, you get the new issue key returned in the JSON response. Then posting the attachment is as simple as described in the api documentation.

So long

Thomas

Thanks, hopefully they make it easier in the future!

Suggest an answer

Log in or Sign up to answer
TAGS

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