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'.
Questions:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.