Forums

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

Retriving value of a custom field inside a custom field

Jamshaid
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.
September 24, 2020

HI
I am having a TextField and has a few other TextFields and checkboxes inside it. The main Field is named as Confirmation and the rest are the subfields. Here is a picture of the view

123.png

I want to get the values of all the subfields named. How do I do that? is there any way for this? If I use the id of the main field, I get a mess of JSON in response. I just want the name and field value of all the subfields/ Is there any possible solution for that? thanks a lot.

2 answers

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
September 25, 2020

This field is not a standard Jira field, it is almost certainly a field type provided by a plugin.

It is pretending to be a text field as far as Jira's data is concerned, and then it is encoding data in Json and interpreting it as a set of fields when Jira calls its code to draw the field.

When your code is asking the field for its content, Jira is responding with the actual content - a block of Json that you're going to need to read and understand in the context of the app that is providing the field.

I would check if the app has an alternate way of reading its data out of a field, but if it does not, then you're going to have to interpret the json yourself.

Jamshaid
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.
September 25, 2020

thanks for your time regarding this. Please lemme know if there's a way for this other than interpreting JSON as I don't know much about groovy for scriptrunner. Also, Please let me know where can I get to learn the groovy for it. any resource or video tutorials. thanks

Jamshaid
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.
September 25, 2020

@Nic Brough -Adaptavist-  It is a bundled field. Any help regarding that? Thanks

Nic Brough -Adaptavist-
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.
September 25, 2020

Bundled by what app?  It's not a field that Jira provides off-the-shelf.

Jamshaid
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.
September 25, 2020

@Nic Brough -Adaptavist-  I have got to deal with the issue. deviniti was used for this designing. Thanks for your support

Solution was available over this link. i just had to modify if according to my requirements.
Thanks a lot again

0 votes
Bastian Stehmann
Community Champion
September 24, 2020

Hi @Jamshaid ,

I guess you are using some kind of app for the creation of the Sub-Fields, right?

I think, you will have to check, if that app does provide a REST API for this.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events