I want to find issues that have a label that ends in either GoLive or Tier1. Issues will have labels like:
I only want issues 1 and 3 back. Issues can have multiple labels as long as one is ending in GoLive or Tier1.
We have scriptrunner and I tried
(issueFunction in issueFieldExactMatch('project in (myproject)', labels, '.*GoLive') or issueFunction in issueFieldExactMatch('project in (myproject)', labels, '.*Tier1'))
But this returns all 4 of the above.
I then added the $ at the end, but not it doesn't return any issues.
(issueFunction in issueFieldExactMatch('project in (myproject)', labels, '.*GoLive$') or issueFunction in issueFieldExactMatch('project in (Smyproject)', labels, '.*Tier1$'))
I've also tried with issueFieldMatch (instead of ExactMatch) but get the same results
Thanks
I was able to find a work around and we've contacted Scriptrunner to report as an issue. It seems that it's concatenating the labels together separated by commas with some unknown character at the end. To work around I used a , (comma) as part of search string to handle when the value was in a list of labels and used .$ to say any single character between what I'm searching for and the end of the list.
issueFunction in issueFieldMatch('project in (myproject) AND issuetype in (Epic, Story)', labels, '[a-zA-Z]GoLive.$|[a-zA-Z]GoLive,|[a-zA-Z]Tier1.$|[a-zA-Z]Tier1,')
@larry joseph can you try this? I don't have a DC instance to test but this works for me in Jira Cloud.
issueFunction in issueFieldExactMatch('project in (myproject)', labels, '\w*(GoLive|Tier1)$')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, testing this and so far it's not working. I had to change '\w*(GoLive|Tier1)$' to '\\w*(GoLive|Tier1)$'. But this doesn't return any results. It seems like it's treating the labels as a comma separated list with some unknown final delimiter. Whenever I use the $ I get nothing back. Will keep testing and reply back if I get anything working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you're open to other solutions from the Atlassian Marketplace, this would be easy to do using the app that my team and I are working on: JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a long list of advanced features, including support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter issues via regular expressions.
With regular-expression-based filtering, you can apply pretty much any logic, including the one that you are after:
In your case, this regular expression should work:
.+(GoLive|Tier1)
Once you've identified your issues, you can work on them directly in JXL (e.g., bulk edit them via copy/paste), or trigger various operations in Jira.
Any questions just let me know,
Best,
Hannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the suggestion. We are set for now on the plugins, but will keep this in mind for the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Doing a little more digging it seems like it's seeing the labels as a comma separated list so if something has more than one label it won't search the expected way, as the regular expression I have assumes it was looking label by label. Any suggestions???
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.