Forums

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

Automation - Create new issue and copy attachment from trigger issue

philipf
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2024

In jira cloud I have 

- Two ticket types (pre-approval, and expense approval)

- They are on the same workflow

- What I would like is for when a pre-approval ticket is approved, it automatically generates a reimbursement ticket. So I used a the trigger 'then create new" to create the new ticket copy fields from trigger issue, and what I am trying now to do is copy the attachment from the trigger issue.

Which is not working since attachments is a required field, and the automation is failing since saying no attachment.

Is this because the ticket is created before the fields are set, and thus no attachment. I am not sure this is it since the other fields whicha re copied from the trigger are not kicking back errors.  

Any thoughts on how I can get the workflow to work with adding attachments so doesn't fail. 
Jira 1.png Screenshot 2023-10-05 152810.png

1 answer

0 votes
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2024

Hello @philipf 

Is "Attachment" a required field when creating your "reimbursement ticket"?

If so, that is a problem.

We cannot create Issue and add attachments at the same time.

You have to create the issue first and then using the created issue key, make a send web request call to add the attachment endpoint..

So there is no work around I am aware of.

You can relax the reimbursement ticket requirement, that is, attachment is optional, but handle it in a workflow later, that is, unless there is an attachment, you cannot proceed the issue to next stage etc..

Hope it helps, Thanks.

 

Suggest an answer

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

Atlassian Community Events