I have a working Jira Scriptrunner script which reads all of the linked issues and then based on linked type, writes that linked issue id to a custom field, example what the script does:
What I cannot find is a way is to search this custom field by value = 'xyz=1'.
You can't do this, and I think you've already worked out why!
Not because the idea or the code are wrong, but because text fields cannot be searched like that. They take only fuzzy searches, and depending on your choice of project keys, the JQL
"Issues linked by realises" ~ XYZ-1
may not reliably do what you want!
The easiest thing that I think would fix this is to (re)create "Issues linked by realises" as a field of type "label". Labels are directly searchable as though they are select lists, but do not need to have an option added to them before you can select it, so your code for populating the labels field would not have to do that as well as setting a value.
Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events