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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

[Confiforms] Webservice rest api with multiselect field

Xavier
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.
Dec 10, 2018

Dear all,

In a Confluence page, using Confiforms, I try to use "consume" a DB dropdown multiselect values field (cst16000) to a WebService using Rest API Jira (to create a Jira ticket with provide data from my page).

The need is to push all values from this dropdown to the Insight Object Custom Field (customfield_16000) of Jira ticket I want to create.

It works well, except when I select multiple values on my dropdown.

 

On my IFTTT integration rules, I add a 'No format' block, with this kind of data (below code runs when select only one value)

 

{
    "fields": {
       "project": {
          "key": "XXX"
       },
	   "reporter" : {
			"name":"[user.name]"
		},
	   "summary":             "[entry.summary.escapeJSON]",
           "description":         "[entry.desc1.escapeJSON]",
	   "customfield_16000" :  [{"key": "[entry.cst16000.id]"}],
	   "issuetype": {
          "name": "YYYY"
       }
   }
}

 

Manually, I can populate multiple values like this:

"customfield_16000" : [{"key": "KEY1"}, {"key": "KEY2"}],

 

How I can have all my values under an array ?

 

In other way, I try to use a Insight Object field type (runs as I can select only one value). But when trying to use an "Insight object (multiselect)", I have no the option to select the Object Type (as proposed with "Insight Object dropdown." So what is the difference between those two kind of fields ?

How I can use Insight Object (multiselect) with the rest api to have the same result ?

 

thanks in advance.

Regards

1 answer

1 accepted

2 votes
Answer accepted
Xavier
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.
Dec 11, 2018

I finally found using virtual function:

 

[[entry.cst16000.transform(id).asArrayOfKVPairs(key)]]

 

reagrds

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.
Dec 11, 2018

ConfiForms has a bunch on "virtual functions" you can apply on the data to transform it the way you need, the full list could be found here - ConfiForms virtual functions

Sana Safai
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.
Apr 19, 2022

Just wanted to add that I changed id to objectKey to make it work. In your example it would be:

[[entry.cst16000.transform(objectKey).asArrayOfKVPairs(key)]]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events