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

How to attach a file when creating Jira Issue via Confiform IFTTT

Kurt Willrich December 20, 2022

Hello,

When using Confiforms to create a Jira Issue, I'm trying to add files as attachments that get submitted with the form.  The Jira issue (and email) are being created, but the file isn't attaching to the Jira Issue.  I've looked at some other questions here and can't seem to get it working correctly. 

I would like to use the Form Field with a fieldname of 'attachments' (a field type of File/Attachments) as the file selector to upload and attach the respective file to the Jira Issue.

Any help is highly appreciated!  Here are screenshots of my setup.

screenshot 1.pngscreenshot 2.pngscreenshot 3.pngIFTTT screenshot 1.png

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
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.
December 20, 2022

Hi

Do you want to create a new attachment and attach it to the page?

Or just upload an attachment and pass it over to Jira?

Alex

Kurt Willrich December 22, 2022

@Alex Medved _ConfiForms_ Thanks for the reply - I'll mark this as answered - I was trying to upload a MS Word document, which isn't accepted, but the other file types (.pdf, .xls, etc.) that are supported did end up attaching both in the email notification and in the Jira issue.  Thanks!

SKAdmin March 22, 2023

Regarding just upload an attachment and pass it over to Jira?

I've build a form that just creates a Jira issue. 

I can't get passed this error using the field definition marco file/attachment

com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"attachment":"Field does not support update 'attachment'"}}

Alex Medved _ConfiForms_
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.
March 22, 2023

How do you pass the attachment to Jira? what is your configuration?

SKAdmin March 22, 2023

I'm using the IFTTT and form definitions. 

image.png

Alex Medved _ConfiForms_
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.
March 22, 2023

Hi

Please remove the part with "attachment" and add a ConfiForms Field (field name parameter set to attach) macro inside the IFTTT macro

Like in here 

https://wiki.vertuna.com/display/CONFIFORMS/Creating+Jira+issue+from+Confluence+with+ConfiForms?preview=/1212664/5341280/jira-with-attachment.png 

Alex

Like SKAdmin likes this
SKAdmin March 22, 2023

That did it. Thank you so much. I had tried that prior but I was using field definition twice instead of just field. 

Alex Medved _ConfiForms_
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.
March 22, 2023

It has to be ConfiForms Field, as this way you reference a field... 

Field Definition defines the field and it's type - and really is part of ConfiForms Form Definition only

SKAdmin March 22, 2023

Thanks again Alex.

I can create a new post, but wanted to see if you have seen this one before. 

Error -

"fixVersions": {"name": "["RegEntry{created=0, id='1_0_0 - Launch', ownedBy='null', recordId='0', createdBy='null', fields={vname=1_0_0 - Launch}}"]"}, } }'. Invalid format. Expected a ',' or '}' at 281 [character 29 line 10]

"fixVersions": {"name": "[[entry.fixversion.asArray]]"}, 
Alex Medved _ConfiForms_
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.
March 23, 2023

What field type in ConfiForms is a "fixversion"?

SKAdmin March 23, 2023

Database Multi-select and Database Drop Down, b/c I really only want the user to select one fix version, but that didn't work either. I've tried the following as well 

"fixVersions": {"name": "[entry.fixversion]"}, 

"fixVersions": {"name": "[[entry.fixversion.asArray]]"}, 

"fixVersions": {"name": "[entry.fixversion.asArray]"}, 

"fixVersions": {"id": "[entry.fixversion]"}, 

"fixVersions": {"id": "[[entry.fixversion.asArray]]"}, 

"fixVersions": {"id": "[entry.fixversion.asArray]"}, 

"fixVersions": {"vname": "[entry.fixversion]"},

"fixVersions": {"vname": "[[entry.fixversion.asArray]]"}, 

"fixVersions": {"vname": "[entry.fixversion.asArray]"}, 

Each Time I get this error 

com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"fixVersions":"data was not an array"}}

Alex Medved _ConfiForms_
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.
March 23, 2023

Why is it a multi-select if you want to put a single option?

Do you want to pass over the ID or the label?

"fixVersions": {"name": "[entry.fixversion.id]"},

or

"fixVersions": {"name": "[entry.fixversion.vname]"}, 

(and I hope the SQL query you use to get those versions does define the ID column, as expected)

Alex

SKAdmin March 23, 2023

I thought it might require it be multi select based on the array error. 

 

Same error  - com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"fixVersions":"data was not an array"}}

Tried both "fixVersions": {"name": "[entry.fixversion.vname]"}, 

SQL i've tried

SELECT  [vname]
  FROM [JIRA_Team3].[dbo].[projectversion]
  WHERE PROJECT = '10300'  AND RELEASED is Null 
  AND ARCHIVED is Null

SELECT  [id], [vname]
  FROM [JIRA_Team3].[dbo].[projectversion]
  WHERE PROJECT = '10300'  AND RELEASED is Null 
  AND ARCHIVED is Null

Alex Medved _ConfiForms_
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.
March 23, 2023

Fix versions in Jira is a multi select and yo need to set an array, as the error tells you

See https://community.atlassian.com/t5/Jira-Software-questions/Using-REST-to-set-fixVersions/qaq-p/1642952

SKAdmin March 30, 2023

Maybe I need to open a support ticket, still unable to use fix version on my new form. 

Alex Medved _ConfiForms_
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.
March 30, 2023

What have you tried?

It expects an array... so it would be something like this

"fixVersions": [{"id": "SOME_ID"}],

or

"fixVersions": [{"name": "SOME_NAME"}],

Alex

Alex Medved _ConfiForms_
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.
March 30, 2023

With multi-select fields on ConfiForms side that would a bit more complex, but also possible as there are helper functions available

"fixVersions": [[entry.mymultiselectfield.asArrayOfKVPairs(name)]]

More on transformation functions in ConfiForms https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions 

Alex

Suggest an answer

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

Atlassian Community Events