Confiforms Create Nested Jira Issues

Drew T
Contributor
August 24, 2022

Hi all, 

I'm currently using a Confiform in Confluence to create Issues within a Jira project using the app-link connection and an IFTTT macro with a nested No format macro containing JSON as described  in https://wiki.vertuna.com/display/FORMS/How+to+create+a+form+to+create+a+Jira+issue+from+Confluence 

By using this method, or something similar, how would you create a Jira issue, with additional nested issues e.g. a parent Epic with a number of child Tasks or a Parent Task with a number of child sub-tasks.  

Curious if this is achievable and appreciate any advice to how to get  it done. 

Thanks, 

Drew

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2022

Hi

You will need to write back the issue key of the created issue

and define more IFTTTs to create sub-tasks

Sub-tasks mappings could then use the value of a created key you got in step #1 and put back to the form's record in step #2

(https://wiki.vertuna.com/display/TEST/Create+Jira+issue%2C+save+the+created+Jira+key+back+to+ConfiForms+and+create+a+page+with+Jira+macro)

Alex

Drew T
Contributor
August 24, 2022

Thanks @Alex Medved _ConfiForms_ , will give it a try and let you know.

Drew T
Contributor
August 25, 2022

@Alex Medved _ConfiForms_  I currently have two ifttt macros, first is to create the jira issue and the second is to create/update confiforms entry.

I created a form field definition in the confiform 'jid' for the jira id to be written to and I've set the parameters in the second ifttt macro to:

entryId=[entry.id]&jid=${iftttResult_createJiraIssue}

But I'm getting an error of 'unknown macro: iftttResult_createJiraIssue'

if I update the parameters to entryId=[entry.id]&jid=iftttResult_createJiraIssue 

The error goes away but it doesn't write to the confiform...

Also the video on the page you linked doesn't seem to load.

Appreciate any advice..

UPDATE: Even though there is the 'unknown error' it still writes the Jira Issue Key to the Confiform. 

Drew T
Contributor
August 25, 2022

@Alex Medved _ConfiForms_ Would you be able to post an example of a sub-task mapping in a subsequent IFTTT to show how it should be done?

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2022

When you put {} in a macro parameters in Confluence the editor fails to render the macro's placeholder and says it's an "unknown macro".

Luckily it does not affect the functionality

Also, instead of ${iftttResult_createJiraIssue} you can have [iftttResult_createJiraIssue]

Alex

Like Drew T likes this
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2022

As for the sub-tasks - add more IFTTT rules (just after the IFTTT that updates your record with a Jira key) and set the "parent" in their JSON mappings to take the value from [entry.jid] field

Good and simple example of such mapping

https://community.atlassian.com/t5/Jira-questions/Creating-Sub-Task-In-Jira-via-API-Rest/qaq-p/774749

Alex

Like Drew T likes this
Drew T
Contributor
August 29, 2022

Thanks Alex, that is great!

Drew T
Contributor
December 13, 2022

Hi @Alex Medved _ConfiForms_ , 

Hoping you can help me out again, I've been able to use confiforms to create a jira issue and sub-tasks and link them together.

However, I'm now having trouble with attachments. How would you go about adding a file as an attachment to the jira issue that the confiform creates?

I need to take the attachment added to the confiform field (field type: file) and add it to an issue in jira.

I've tried using an IFTTT Integration rule to update Jira issue in the confiform, but have been unsuccessful so far.

The initial IFTTT writes the Jira Key back to the field JIRAKey and the Jira issue key is entered into the macro as [entry.JIRAKey]

The JSON in the No format macro within the IFTTT may be wrong? I currently have it as 

{

    "Update": {

          "attachment": [

                {"filename": "[entry.filefield]"}

            ]

     }

}

Appreciate your help, if you know how this can be achieved.

Thanks, 

Drew

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 13, 2022

Hi Drew

Attachments are not mapped via the JSON mapping, you just need to drop a ConfiForms Field macro, with field name set to you "file/attachment" field into the IFTTT macro body

Alex

Like Drew T likes this
Drew T
Contributor
December 14, 2022

Thanks @Alex Medved _ConfiForms_! Works perfectly and is much simpler than what I was trying to do.

Really appreciate your help!

Drew 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2022

Yes, it is much simpler.

The thing is - uploading attachments to Jira is a separate step from creating a Jira issue. That is why it is not in the JSON

Suggest an answer

Log in or Sign up to answer