Forums

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

ConfiForm rendering an array from Jira

Jim Rogers July 5, 2022

Hey, I am looking for guidance on rendering the Labels array returned in a Jira payload on ConfiForms.   I have tried referencing the array via a Formula field type and the expression as: "[myfield.fields.labels.transform(value).asList]" .  Also referencing without the virtual asList as: "[myfield.fields.labels.value]".

What I get is:  ["["label1","label2","label3","label4"]"] could not be calculated, Unknown operator or function: label4

All I am trying to is display the list of values on a Form View macro.  I am successfully displaying other values (that are not arrays) on the form.  I also know the data is coming in as the correct values are represented in the text of the error (as above). 

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
July 5, 2022

Hi

Welcome to this community @Jim Rogers 

What are you trying to calculate with your labels? I mean, why do you use a formula field?

Why not a simple text field? Or a dynamic multi-label field?

Alex

Jim Rogers July 6, 2022

Alex,

I am sure I am over complicating it.  I was using the formula to be able to get the value into the field.  

My Jira JSON response is:

"labels": [
"Label1",
"Label2",
"Label3",
"Label4"
],

All I want to do is display these values on the Form View 
Confiforms form view.jpg

I have a number of other fields returned from JIRA I need to display on the form.   One is working with the formula (Not an array field).  So the simple text field is certainly a more appropriate type.  I just don't know how to get the value in it.  

Thank you!!!!   Jim

Alex Medved _ConfiForms_
Community Champion
July 6, 2022

You can access Jira fields directly in your views, via Jira field

https://wiki.vertuna.com/display/CONFIFORMS/Accessing+Jira+issue+fields+directly+from+ConfiForms+using+Jira+issue+field

I dont quite understand what is this "myfield.fields.labels"...  What is myfield? is it a  Jira field you have in ConfiForms?

Alex

Jim Rogers July 6, 2022

Alex,

Changed the screen prints to help.   JiraID is my field in the table that contains the field of type Jira Issue.  All of that is working perfectly.

I have actually used the information on the above page and they work fine for the table view macro.   I am trying to show these on a Form View and with the values in the label array. 

Confiforms form view 2.jpg

What I get is the Jira object description as if I wasn't referencing a sub field in the JSON structure.  

Confiforms form view 3.jpg

Finally, if I reference JiraID.fields.labels on the table view, it renders as ["Label1","Label2","Label3","Label4"].  So not great, but it works.

Thank you!   Jim

Alex Medved _ConfiForms_
Community Champion
July 6, 2022

But what do you want to get rendered? The values can be transformed, I am pretty confident

What format do you want to see?

Alex Medved _ConfiForms_
Community Champion
July 6, 2022

Little demo of what you can do with multi label field, for example...

http://recordit.co/YXWwUu0fcn

Jim Rogers July 6, 2022

Alex,

I got it to work with your guidance and video!!!  Now I need to read more on the new portions you taught me (and eventually others will benefit).

I really appreciate you helping here.

Jim

Alex Medved _ConfiForms_
Community Champion
July 6, 2022

You are welcome.

PS, you can accept the answer in this case ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events