Looking for JQL or some other method to compare fields

stsci November 24, 2020

Ok, so we are trying to create a link between two issues with the same content in two projects that contain the data in differently named fields.

We expect to need a JQL query that can search for issues with the same data in both fields, but without knowing the content of those fields (which I do have, but that would be painful to run on all 600 of these issues). We are considering a listener with scriptrunner to complete this. (as opposed to an automation, which may actually be the best bet.) but the JQL is tricky.

We are super open to suggestions

We can get a list of issue that contain data in either field, obviously

project= xxx AND "field" is NOT EMPTY OR project= yyy AND "field2" is NOT EMPTY

Lacking is a way to compare the content of those fields.

Thanks for any help you can provide.

1 answer

0 votes
Bill Sheboy
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.
November 24, 2020

Hi @stsci 

Would you please clarify two things in your question:

  • When you say "create a link", do you mean just to perform the search or to link the issues?
  • Do you just need to do this one, or repeatedly in the future?

If this is a one-time search only request, I would just export to a spreadsheet and do the column compare from there.

If you need to do this repeatedly in the future, or do more complex linking actions, please consider looking in the marketplace for add-on tools for scripting.

 

Best regards,

Bill

stsci November 24, 2020

In truth we would be happy with just performing the search at this point, I can create the links with a scriptrunner script, I just need the query and CANNOT figure it out. This cannot be done with a spreadsheet compare as the data is being imported from another system through a connector. 

 

It's a big one the first time, but after this it would only be newly created issues. (Intial 600 or so issues, after that maybe one or two issues per year? SO the query is most important.

stsci November 24, 2020

As a further update, we tried

issueFunction in issueFieldMatch("project = XXX" , "field1" ,"ABC-\\*") OR issueFunction in issueFieldMatch ("project=yyy", "field2" , "ABC-\\*") 

which is a fine query but is really meant for comparing fields in the same project...it appears...

Like Dimitrios Moschovitis likes this
Bill Sheboy
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.
November 24, 2020

Thanks for clarifying.  I haven't used scriptrunner for years, so I'd wait a bit to see what other responses you get from the community.

I added the scriptrunner tag to your question to see if that helps.

Like stsci likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.6.1
TAGS
AUG Leaders

Atlassian Community Events