Hi there...hoping someone can share some tips or insight.
I'm unable to search with the 'like' ~ operator for a URL type field. The URL validation works but I'd like to search for all bugs related to specific countries, where each country has set of URLs across various environments like development, test, staging, and production.
For example: I want to see all bugs reported for France where the URL is like "http*fr*".
Everything I've read indicates this isn't possible. Only =, !=, in, not in, is, is not, are valid operators. But I'm hoping there is a creative workaround or way to change the URL custom field type without losing the content already entered. Note - I'm not a developer and am unfamiliar with writing or using things like Script Runner.
Hi Michelle,
Have you tried using Automation and Smart values to do this?
You could try creating an automation that extracts the country from the URL-field and then pastes that value to another field called, e.g. Country. Then you could simply filter issues by the Country-field.
To do this you need to create an automation with with following variable (which contains the smart value):
Variable name: ExtractCountry
Smart value: {{issue.cf[Field ID].text.substringBetween("[what ever is in the URL before the country string]","[what ever comes after the country string]")}}
(replace the bolded text with your own values)
The automation could be something like this:
1. When: Issue created
2. URL field is not empty
3. Then: Create variable
- ExtractCountry
- {{issue.cf[Field ID].text.substringBetween("[nn]","[nn]")}}
4. And: Edit issue fields: Country
- Paste the variable as the field value: {{ExtractCountry}}
5. And: Add value to the audit log
- This is optional but helps when trying to get the automation to work
You can also set the trigger to be run manually at first when you are testing the automation and once you get it working, you can run it when a new issue is created.
Hopefully this works for you.
Hi Michelle,
Since that's not possible in JQL, the first thing I would do is attempt to query the data using the API and search the results.
Barring any additonal advice, another option would be to perform a SQL search, however, it's not recommended to manipulate the db directly as it can lead to issues if something goes awry. In light of that, here is the JIRA Database Schema.
You can use the JIRA Database Schema to write a SQL query to find the data you need:
You can also find the custom field id using the article How to find id for custom field(s)?
Once you have the custom field you or your dba should be able to construct a query to find the issues based on the custom field.
In addition,
Cheers,
Branden
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you...I will give it a try.
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.