Forums

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

Custom Fields Comparison - Dynamic Data

Nancy Noyes September 18, 2023

I would like to create a query where two custom fields of different names have the ability to return the same data.  The problem I run into is that sometimes one custom field is an array and the other is a text string.

Example:

Issue A has custom field string "Name".  (Custom field "Name" will change for each issue, and the name is automatically created by values collected from other fields in that issue.)

Issue B has custom field array "Name(s)" with a multiselect option of strings.  (Custom field "Name(s) contains 100+ values in the array.)

There are times I'd like the workflow of Issue B to search Issue A's "Name" custom field such that it matches one of the selected "Name(s)" values in Issue B's array.

There are also times I'd like the workflow of Issue A to search Issue B's "Name(s)" custom field such that one of the array values matches that of Issue A's "Name" custom field value.

Note: It is important to be able to build the query such that "Name" and "Name(s)" are not constant known values, but will be equal when those fields are populated and searched since they will change from issue to issue.

1 answer

0 votes
Tom Lister
Community Champion
October 6, 2023

Hi @Nancy Noyes 

I think that logically a check like

A.Name in B.Name(s)

should only return true when A and B share a common value

How you check that would depend on the options you have available to your workflows. That is, are you using any plugins like Scriptrunner, JWME, JSU etc.

Suggest an answer

Log in or Sign up to answer