How do I filter issues by custom field and how do I make this field unique?
My custom field is a simple integer
>How do I filter issues by custom field
I think Callum answered this
>and how do I make this field unique?
I think you're asking to generate yet another unique identifier for an issue here, which sounds as simple as creating a number or string and making sure no other issue takes the same value as another.
You'll need to code to do this, with the minimum viable option being a validator that can search for the id entered by the human and tell them to bog off if they enter a duplicate. More advanced ideas would be to generate a new unique one and then set it for them. This is a bad thing to do, as it will not scale. It'll work fine when you've got a few thousand issues, but do you really want to have to do a uniqueness check across a million issues on every create and edit? Nope.
I strongly recommend you look again at the "need" for such a field. It's redundant (Jira already has two issue ids that uniquely identify an issue with no need for the humans to do anything), it's less functional (you can build urls and quickly identify issues from one of the unique keys, amongst other things), and your humans are never going to use it in preference to the actual issue key.
What problem are you trying to solve with this "unique" number?
Hey @Daniel Tita ,
can you provide us with a little more context? Filtering issues using custom fields as a parameter is not different from other issues searches. (Little bit more on advanced searching especially with custom fields from the docs)
What do you mean by "unique" in this context? Is the integer value only allowed to be used once in your project/instance?
Best, Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Max. I need one issue to have one custom field that cannot be reused in another issue. How do I do that? And how do I pin my custom field as a column header that I can sort issues by
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Daniel Tita ,
How are you wanting to filter your custom field? You can add parameters to a JQL search to filter based off the integer value, such as
customfield > 5 AND customfield < 100
See more on how you can use JQL to filter here
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 that. I need my custom field to be added as a column header that I can click and sort the fields. Can I do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes this is possible - if you are referring to a column in the search navigator, there is a 'columns' dropdown when you are on the advanced search view, where you can add your custom field as a column. By then clicking on the column name, it will toggle the order from ascending to descending.
The same thing can be done with a Jira Service Management queue, where you configure the columns when editing the queue
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.