Hi,
I would like to get a list of issues from project A with condition that the key for the issue is a field name in another project B. But the 2 tickets are not linked.
Project A: Sample ticket "PROJA1234"
Project B: Sample ticket: "PROJB5678" has a field called "Altkey" with a value "PROJA1234".
Both tickets are NOT linked.
I need a list of ticket from Project A which matches the criteria that they are listed as a value in that field on Project B tickets
I tried the following, didn't work
project = "PROJA" AND type = Task AND issueFunction in issueFieldMatch("project='PROJB' and type=Task", "Altkey", "PROJA*")
Tried with both issueFieldMatch and issueFieldExactMatch, no luck.
Can anyone help?
Welcome to the Atlassian Community..!
The issueFunction option in JQL is provided by ScriptRunner for Jira by Adaptavist and is not part of Jira's default functionality.
I hope you are using the JQL Keywords in the Enhanced Search screen under Apps > Enhanced Search or within Jira's issue navigator. You can find their documentation here:ScriptRunner Enhanced Search
Moreover, you can also submit a support request to the ScriptRunner Team: Submit a Suppport Request
What field type is Altkey? Is it a text field or an Issue Picker field (or something else)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not a regex guru by any means, but I'm not sure that you can use * in your search. Take a look at the Scriptrunner documentation around the issueFieldMatch function:
After looking at how the issueFieldMatch function works, I'm not sure it's possible to do what you want using that function.
project = "PROJA" AND type = Task -- This will return any Task in the PROJA project
issueFunction in issueFieldMatch("project='PROJB' and type=Task", "Altkey", "PROJA*") -- This will return any tasks in the PROJB project that have PROJA in the Altkey field.
You'll never get anything from this query because you're trying to get a Task that is in both PROJA and PROJB.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is kind of a clunky workaround, but you could have a scripted field that only runs against PROJA tasks and returns a true value if there are any PROJB tasks that have a value in the Altkey field that matches the issue key. Then your JQL could return a list of issues where that scripted field value is true.
You could also make the scripted field a mulit-issue picker list and store all of the PROJB tasks in the field, if you wanted.
I could probably write this for Data Center, but I don't know if the syntax is the same for Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.