Combine multiple queries (or alternative solution)

Hello,

I am currently tasked with:

  1. seeing how I can set related Projects for an Issue
  2. creating a query that shows all Issues of a project and the issues that are related to the project

My first thought was a Multi-Value field, that I would query for. The problem I am having is, that I can't think of a query that both gives me all the issues from the project (regardless of the related Projects field) and the issues that have the related Projects field to a given value. Is there any way to have an or/and statement, that I was unable to find?

If anybody has an idea/solution, it would be greatly appreciated!

All the best,

Kai

 

0
3 comments

Hi Kai!

I'm Sergey from the YouTrack team.

To link issues, you can use a dedicated Link issues feature. By default, there's a 'Relates to' link that you can use. Then, to query issues, you can use the following search query: project:<project name> OR Relates to: (project: <project name>). Replace the project name placeholder with the actual name. It'll find all the issues that belong to this project or ones that are linked to this project's issues. More details about the search syntax are available in the related documentation.

If any questions appear, please let me know.

1

Thank you! Now that you have linked the documentation and shown the all caps OR I found it instantly and feel a bit silly for not having seen the "Operators" part in the Index.

That helps a lot! :)

0

Glad to hear that it helped. 

all caps OR

Just in case — operators are case insensitive, though I think it helps to use uppercase to read the query.

0

Please sign in to leave a comment.