Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Looking for JQL or some other method to compare fields

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

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

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.

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...

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
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

6,189 views 23 40
Read article

Community Events

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

Events near you