Use fields from Form to change Issue Summary
Asked by Mart Postma:

Hi all,

I'm wondering whether it is possible to use fields from Forms to update the Issue Summary.

As an example, we have a request type in our internal IT Portal "New Resource Onboarding", which is entered once IT needs to setup all accounts for a new resource.

We have set the default Summary to be "New Resource Onboarding", so every time a new request comes in, the Summary field gets defaulted to that value.

But now comes the issue - if HR logs multiple requests in a short time period, it is hard to distinguish in the request queue which request is made for which new resource.

We have two short-text fields "First Name" and "Last Name" in the Form which we would like to be concatenated to the default Summary like this: "New Resource Onboarding - {First Name} {Last Name}".

I am aware that fields on forms don't behave like custom fields, but am curious if there is another way to achieve this concatenation in the Summary field.

Therefore my question is, is that possible? If so - how?

Thanks!


Answers:
author: Eli Devlin
body: Hi [@mart](/t5/user/viewprofilepage/user-id/2800281)

I went through this same journey some time ago.

Retrieving and using the 'answers' to form fields is nightmarish. It may as well not be possible.

Using custom fields is the way to achieve what you want.

I hide + fill with default value the Summary field in a lot of my Request Types, and use automation triggered by issue creation to then edit the Summary field and append or prepend custom field values to the default summary value set by the Request Type config.

Working with an API for this would also be a gargantuan undertaking if you've never done it before, not advised for something so simple.


author: Miguel Ramon
body: Hey [@Mart Postma](/t5/user/viewprofilepage/user-id/5313648)! Miguel from ServiceRocket here.

So you may be aware you can pass on form data into custom fields, and you can in theory use a form field and map it to the summary, however, I don't think you can manipulate it in a way in which you an prepend or append data to it on top of what the value is in the field you use as a base.

Unless I'm wrong I think you'll need an automation rule for this:

- Leave the default summary as is

- Then create a custom field to store the form field to.

- Edit the form so the particular field you want points to this Custom Field (I believe there is no way to retrieve form data yet)

- Now, create a rule that fires on issue create for that project

- Configure it so it performs the action **Edit issue fields, and choose the ummary field to be edited**

- Now, use smart values to append the data. It should look something like this:

```
{{issue.summary}} - {{issue.customfield_<id of custom field you created>}}
```

Let me know if you have any questions! Maybe there is a simpler solution but missing it right now.

comments: author: Mart Postma
body: Hi [@Miguel Ramon](/t5/user/viewprofilepage/user-id/5057865) - thanks for your reply.

My preferred solution would of course to not use custom fields - that's why we switched to Forms in the JSM project!

Any chance you could help me to understand this (new?) API for Form I just encountered in another thread? See: <https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-customer-request/#api-request-issueidorkey-form-formid-format-answers-get>

I'm not so familiar with using APIs in Automation Rules, unfortunately. Thanks for your help!


Tags: cloud

jira-service-management

jira-service-management-cloud