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

JSM: Copying a Forms field populated with a data connection to an existing customfield

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

We are trying to use a Form field that is populated to a data connection to a Jira custom field.

The Forms field looks as follows:

forms_view.png

Ideally, we thought we could copy this value to an existing custom field, but we get the following error:

forms_data_connection.PNG

Now, the question is is there a script or post function where we can strip the value of the forms field and copy it to an existing custom field? Looks like Automation doesn't have any options at this point.  

cc: @Peter Preston 

Thanks,

 

2 answers

1 accepted

2 votes
Answer accepted
Peter Preston
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.
March 9, 2022

Hi @Fabian Lim 

This is something we've been discussing. I can't share any timelines, but it's on the roadmap.

Can't speak to a script that would get you what you need, but will report back if I find something that could help.

Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

Thanks for the update.

Like # people like this
Jim Bren
Contributor
March 21, 2022

Came poking around looking for the same functionality. This would be a fantastic feature to have and would make Forms much more powerful.

Like # people like this
Muhammet Ayal
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2022

Hi @Peter Preston is there any feature issue for this?

Peter Preston
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.
May 12, 2022

@Muhammet Ayal do you mean a feature request ticket? Not that I know of right now. I've discussed this functionality with the product team, but don't have any updates to share. 

Karoline Rezende Ramos
Contributor
August 10, 2022

Hi @Peter Preston 

Any news about being able to copy the value of a form field to a custom field? That would be great...Forms does and doesn't work because we don't get the information for indicators for example.

Peter Preston
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.
August 10, 2022

@Karoline Rezende Ramos no news yet. 

Like Karoline Rezende Ramos likes this
Tal Sabag December 6, 2022

Any workarounds someone can think of ?

Adam England
Contributor
February 25, 2023

@Peter Preston 

See below - got a fix

Like # people like this
2 votes
Adam England
Contributor
February 25, 2023

Managed to get this working for anyone else interested.

I have a data connection to our HCM (Workday) via API which gives the user a dropdown selection of locations.

automation_datafield.png

Using the above suggestions I managed to pull the value on issue creation and then set a custom field as text to drop the field from the form.

I can now match it to our centralized reporting in Power BI.  Pretty neat!

Tal Sabag February 25, 2023

@Adam England 
Hi Adam,

Thanks for sharing,

is that Cloud or Server JSM you are using ?

also, can you explain the syntax ?

what is "i1", "state" and the rest,
how can I find this specific from an existing form ?

Thanks !

Tal.

Adam England
Contributor
February 25, 2023

Cloud.

You would only need to change the number between answers and choices. 

The number refers to the proforma field. Use inspect element to find the number you need. Mine happens to be the first field in the form.

Tal Sabag February 25, 2023

Great ! I will try that 

@Adam England 

 

No need to specify the form name or id ?

What if I submit 2 forms is an issue ?

Adam England
Contributor
February 25, 2023

I'm assuming you'd replace proforma.forms.i1 to i2


Here's the inspect element:-

element.png

Mateus Martins
Contributor
October 5, 2023

Hi Adam!

Thanks for sharing this!

I've tried replicating it and it returned a number instead of the option selected.

Would you have any lead on why?

How did you get to "{{issue.properties."proforma.forms.i1".state.answers.1.choices.get(0)}}"?

Thanks!

Cheers

Mateus Martins
Contributor
October 5, 2023

Hi everyone!

After doing some searching and testing i found out that at the moment you cannot retrieve the value selected from choice fields eg.: select list (single choice), what you can get is the id from the selected option.

See: https://community.atlassian.com/t5/Jira-Service-Management-articles/Reading-a-Forms-ProForma-field-value-without-the-JSON-tab/ba-p/2097012

Adam England
Contributor
October 5, 2023

Hi Mateus, 

Glad you're on this journey too!

Try the following: {{issue.properties."proforma.forms.i1".state.answers.1.text}}

This returns the text of the value instead of the option.

Hope this helps!


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events