Forums

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

ConfiForms IFTTT won't link issues with copy/paste code from confiForm IFTTTthat does

Brian Karst
Contributor
April 29, 2020

I am attempting to link two issues in a parent/child relationship, in the troubleshooting of why none of the IFTTTs on my form will link any issues. Yet when another form is used, issues are created and linked with no problems. the IFTTTs on the form won't even link to an already created hardcoded issue. Example JSON below. 

 

"update": { "issuelinks":[{"add": {"type":{"name":"Parent to Child relations", "inward":"is parent of", "outward":"is child of"}, "outwardIssue": {"key":"PLAYSPC-2424"}}}] }

 

is there something that I am missing?

 

 

 

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
April 29, 2020

You can enable debug for IFTTTs execution and see if they are executed at all https://wiki.vertuna.com/display/CONFIFORMS/How+to+troubleshoot+and+debug+ConfiForms+IFTTT+rules+execution

 

Most often we see customers set previous IFTTTs to fail silently (without a report to user) and then scratch their heads to understand why it does not work the way it should

Brian Karst
Contributor
April 29, 2020

New Question!

Through trial and error, I found what was preventing the link from happening and I think I know why. We have a Select List (Cascading) custom field that contains the Divisions and Subdivisions that employees could work for. A while ago I got the input for the field working but I think the barbaric way I did it is breaking the ability for it to "upfate"

Searching how to input the ID's in JSON i found the syntax

    {"id":"11111", "child":{"id":"22222"}}

So I set up a form with the ID's and set up a smart classifier and enter the code

"customfield_13062": {"id":"[entry.smartdepart.ParentID]", "child":{"id":"[entry.smartdepart.ChildID]"}}

 

Then I get an error because Jira doesn't like that the child ID is blank. (edited error message below)

com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"customfield_13062":"Child Option id '' is not valid"}}

Used JSON:  "customfield_13062": {"id":"32410", "child":{"id":""}} }} }' 

 

I tried null and I can't remember what else instead of a blank in the form, nothing worked. Eventually I put the code for the child input into the ID in the form and used the code

"customfield_13062": {"id":"[entry.smartdepart.ParentID]"[entry.smartdepart.ChildID]}

where

Parent ID = 11111

and

Child ID = , "child":{"id": "22222"

 

In my frustrations with the IFTTT not linking issues I started picking it apart and if I hard code an ID or remove the "customfield_13062" line the IFTTT links issues just fine. Is there a better syntax to allow Jira to accept there sometimes being a ChildID and sometimes not?

Alex Medved _ConfiForms_
Community Champion
April 30, 2020

This is more a Jira REST API specific question that something related to ConfiForms itself.

Or even the documentation for the "Select List (Cascading) custom field" ... is this something standard in Jira or is a 3rd party plugin provided feature?

Brian Karst
Contributor
April 30, 2020

Yes and no. the Rest API is fine without the ConfiForm input, if there is no ChildID it seems to just want you to not try to set it, instead of allowing it to be blank/null. But I will definitely seek other assistance. Select List (Cascading) is not 3rd party. There is other documentation I have found on it but

https://developer.atlassian.com/server/jira/platform/rest-apis/

 

Cascading select custom field: A custom field that allows you to select a single parent value and then a related child value. You can address them by value or by ID.

"customfield_11447" : { "value": "parent_option1", "child": { "value" : "p1_child1"} }

or

"customfield_11447" : { "id": 10112, "child": { "id" : 10115 } }

Alex Medved _ConfiForms_
Community Champion
April 30, 2020

Hmm, this is interesting

the Rest API is fine without the ConfiForm input

ConfiForms just passes the JSON you have constructed to Jira service. And the answer comes from Jira, there is no business for ConfiForms more than just to pass what you have in the mapping and show the answer to you

Darin Hafer February 9, 2022

@Alex Medved _ConfiForms_ I use this method below to create an issue. It creates the issue successfully, but I also want to link it to another issue.

As mentioned above, it looks like Jira has a different endpoint for linking issues and it cannot be done during create.

Do I have to make a subsequent call to link issues after the create? Can you advise on how to do that?

Screen Shot 2022-02-09 at 9.32.04 AM.png

Alex Medved _ConfiForms_
Community Champion
February 9, 2022

Sorry, what do you mean by link it to another issue? Setting the parent issue or something else?

Darin Hafer February 10, 2022

In Jira, you can create an issue and link it to another issue all in one step.

Can that be done in Confiforms?

On my form, I have a "jira field" where a user picks a Jira issue from the field. [entry.upstream].

I want to link the chosen issue with the issue that is being created.

Apart from writing a post-function to get the "upstream" ticket from the Description, and creating the link during the create transition, is there some way via Confiforms to link (is parent of, is child of, etc) the created ticket to the [entry.upstream] ticket?

I ask here since linking issues was mentioned on this topic.

Alex Medved _ConfiForms_
Community Champion
February 10, 2022

Sorry, I cannot answer this, as I dont know what exactly Jira does when "you link it to another in one step". Do you select an issue in the lookup field when you create a jira issue in Jira UI?

In this case you need to figure out what field it is (custom field or whatever else) and add it your mapping (in ConfiForms)

Darin Hafer February 10, 2022

I'm referring to a system field in Jira called 'Linked Issues'.

Have you heard of this field? I use Confiforms to create an issue and that works great, but I also want to set the 'linked issues' field.

That requires calling this API also: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.12/#api/2/issueLink-linkIssues

I can't seem to set that field on 'create' via Confiforms.

 

Screen Shot 2022-02-10 at 11.03.45 AM.jpg

Alex Medved _ConfiForms_
Community Champion
February 10, 2022

You can call any Jira API you need - either through AppLink Service IFTTT or via WebService connection IFTTT

On this page we show how to set up something similar (yes, another IFTTT call) to create remote link  (bottom of the page, under "Important" sub-header)

https://wiki.vertuna.com/display/CONFIFORMS/Creating+Jira+issue+from+Confluence+with+ConfiForms

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events