Forums

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

How to update an attachment in place on an existing JIRA issue using Confiforms?

Tom Stocki November 29, 2021

I have a Confiform that has a number of fields and accepts an attachment.  I then use Confform IFTTT integration rule onCreated event to create a JIRA issue with that attachment attached.  This all works as expected.

When a user edits the Confiform and saves, the JIRA is updated properly using an IFTTT integration rule onModified event and the update JIRA issue action EXCEPT a second copy of the attachment is added.  The attachment is not updated in place.  Each time a user edits the Confiform and saves yet another copy of the attachment is added.  This quickly becomes problematic.

How can I prevent this from happening?

 

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
November 30, 2021

Hi

ConfiForms does not know if you have any attachments on Jira issue or not - it just does what you tell it to do.

And if you have an Update Jira issue handler set up to run on ConfiForms record edit then it will do what is asked  - update Jira issue and upload attachments if any

I suggest to have 2 IFTTT handlers, with conditions - one to check if the file field has changed (in ConfiForms) - using hasChanged function (https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions)

And another one is to react when it did not - and this IFTTT macro body should not contain ConfiForms Field macro that references file (so it will not get uploaded to Jira)

Alex

Tom Stocki November 30, 2021

Thanks Alex.  That worked.  Although creating copies of handlers is less than ideal.

For those that pass through here after me. 

This worked as a condition: "hasChanged(IssueReportAttachment):true"

While this condition did not: "hasChanged(entry.IssueReportAttachment):true"

Alex Medved _ConfiForms_
Community Champion
December 2, 2021

Hi

This one is correct, because hasChanged  function expects a name of the field to check for changes

hasChanged(IssueReportAttachment):true

Alex

Suggest an answer

Log in or Sign up to answer