Forums

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

JIRA On Premises - REST API - Attachment with Issue Create

Kashif Pervaiz June 11, 2020

Hi,

The issue type create screen has attachment as required field.  From what I have found so far is that I need issue key before attachment can be added.  What do you advice?  How should I handle this case?

Your help is always appreciated.

Regards,

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 15, 2020

Hi Kashif,

I understand that you're using Jira Server and want to be able to make a single REST API call to create a new issue in Jira while at the same time include an attachment. 

I don't know of any way to currently do this exact behavior in a single REST API call.  Although there have been past requests for this, and an existing feature request over in JRASERVER-70074.

That said, I'm not clear on how exactly you might have been able to make the attachment field a required field.  At least in my own 8.7.1 test instance, I can see Attachment in the field configuration schemes, but I do not even have the option to mark that field as being required.  Could it be a function of a plugin to Jira?  Or is there some other workflow validator/condition in the workflow that is looking to make sure that the issue has an attachment before allowing that create transition to occur?

If this is a workflow restriction, then I fear that the only current solution would be to change where in the workflow this validator/condition exists to another transition after create.  This way you could still create requests, and then add the attachment later to them.  Perhaps this is another way to address the desired restriction.

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events