Multiple external ticket references

  • 5
  • 32

We are using YouTrack for our development issues, and need to link back to our customer support ticket system. In the past (Mantis) we just put the ticket numbers in the description, but I was hoping to actually have a custom field for it in YouTrack.

The problem I can't seem to resolve is that there can be multiple tickets per issue, and if I create a custom field of type 'string', and put something in there like "10000, 10003, 10008", I can't seem to search for 10003.

I could use an enum[*], but as every issue will have different ticket numbers, it would be cumbersome to have to go in an create a new value for the enum each time.

Basically, how do I search for all issues with a custom field containing a value? I've tried *10003* and that doesn't return anything. Also "ticket: 10003" with or without wildcards doesn't work.
Hi Mark,

To search for values, please use a hash character (#). So, your filter looks like
#1003

To search for particular value from the field, use
ticket: 1003
this query. It's assumed that field type is enum.

Speaking of your particular case, the best way to implement this is to use String type for your field. You will be able to search separated string elements using wildcards
ticket: {10003*}


Thank you.
Regards,

Andrey Tigay
YouTrack engineer

ticket: {10003*}

I tried something like this, and it didn't seem to work. I have an issue and in the string-field for "ticket" I have the value "49110 / 49220 / 49281 / 49227".

If I search for "ticket: {*49220*}" I get no results.
If I search for "ticket: {49110*}" I do get an issue in the results.
If I search for "ticket: {*49281}" I get no results.

That means I can only search for issues where the first ticket number is the one I'm after. The "ends with" or "contains" wildcard format doesn't seem to work.

Hi Mark,
Wildcards can now only be used as a suffix replacement. Here's a feature request related to full text search support for custom fields of string type: JT-12846.

Regards,
Alexander

So there's no way to achieve what we need without just putting the codes in the body of the issue text?

Can you link this issue with that feature request? I think this is a slightly different use-case, and might either support and/or justify the enhancement. It's different too, because JT-12846 was specifically asking for search without using the fieldname.

Mark,

Speaking of current workaround, yes, you can put this codes in issues description or summary.
Feature JT-12846 will respect your use case. You'll be able to search for values of string type. So, your query: 1003 will find an issue with this value. As far as I can see your original use case will to make it possible to search for values without custom field name.
Anyways, I've added this thread to JT-12846. You are also welcome to leave there comments and votes, it'll be very valuable.

Thank you.
Regards,

Andrey Tigay
YouTrack engineer