Forums

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

ScriptRunner: search similar work item based on field value and copy field values

Doods Perea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 22, 2025

Can anyone please help on my ScriptRunner problem below?

In the Jira Service Management Portal form, the customer provides the unique "Membership ID Number" (e.g. 01-ABC123).

I would like for ScriptRunner to search the Jira project where the form belongs.  If it finds the same "Membership ID Number", copy the field values of the found work item (Full Name, Date of Birth, Address, etc.).

In this way, the customer is able to complete the form faster.

Thank you.

Doods 

2 answers

0 votes
Matteo Vecchiato
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 23, 2025

Hi @Doods Perea ,

Welcome to Atlassian community.

The solution offered by @Benjamin is a good solution if you have premium or enterprise plan.

There is an alternative solution, that I think is what you are thinking, that consist on creating a Jira project with the employees data; in this case a work item represents an employee and has the required data as fields.

Then, to search an employee, a automation couldbdo the work with a search Jql action and copying the data to the opened ticket.

You can use Script runner if you prefer, calling a rest API like this: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get 

I hope it helps.

Kind regards 

0 votes
Benjamin
Community Champion
August 22, 2025

Hi @Doods Perea ,

 

Not sure if approach would be the optimal way to go about it. Searching the entire project through all the form data to find information each time a customer fill out form can be expensive. 

 

You may want to have a database or use assets to hold your customer membership ID and use jira automation to pull the rest of the info. This is quite common scenario like in IT. For example, when an employee files a ticket about their laptop,  their information would be pulled from assets. Think of assets can be used as a look up table. Searching on specific table is much more efficient than search all over the project. 

 

Of course, go with what works with best for your situation. Sharing an alternative way to go about it. 

 

All the best.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events