JIRA JQL search custom field values

Fabian Toth June 16, 2013

Hi,
i try to get all issues which includes the value "xyz" in the customfield "myCustomField".
This means there exists a field "myCustomField" within some issues and there is for example the value "xyz" stored. Now i want to find all issue which have this value in the custom field.

In the Database the my field has the ID "10001" and the cfname "Requirement" but i cant query this like:
project = "Project1" and "Requirement" = "xyz" or project = "Project1" and 10001 = "xyz"

How can i query this?
Thanks!

6 answers

2 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2013

project = "Project1" and "Requirement" = "xyz"

Should work. What error are you getting? Or it is not simply returning any results? What kind of a custom field is it?

Fabian Toth June 16, 2013

Thanks a lot for your fast answer, the field which i mean is in the issue itself. On the following picture you can see an example issue and the field "Requirement" ... there are different values (1545,1664 etc) and i will get every issue which includes the value "xyz" for example ..

Like Alibek Malikov likes this
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2013

Seems a custom developed field? Do you have a searcher written for it?

Fabian Toth June 16, 2013

How can i write a "searcher" for the field? Is there a tutorial or something like this?

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2013
1 vote
Fabian Toth June 19, 2013
Hi, Thanks a lot, it works fine =) Is there a way to show the result on an JQL query in a custom field which i can bind to the navigator culomns?
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2013

You add the field to the issue navigator, and it should appear. By default, just having a "view" template named in the atlassian-plugin.xml should allow you to do this (but you can override it, or even disable the usage in the navigator column).

If it does not appear on the list of fields on offer when you try to add columns to your navigator, have a look at the plugin's xml, maybe post it here to see if we can see anything odd.

0 votes
Fabian Toth June 22, 2013

Thanks for your quick anwser! Can you give me a tipp how i can write this? Do you mean i have to write a own custom field? Where can i find information about this? Thanks

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 22, 2013

Apologies, I keep saying "derived", but the right word is "calculated"

Start at https://confluence.atlassian.com/display/JIRA041/How+to+create+a+new+Custom+Field+Type#HowtocreateanewCustomFieldType-Lastcommentedusercalculatedfield (it's for Jira 4, but mostly still good for V5 and 6)

0 votes
Fabian Toth June 20, 2013

Yes right, i want so do a query within the search result query, for every item in the search result there is a custom field which should show a extra query, but i want to parametrizise the second query with the respective issueid from the first query. I have tryed the PlugIn "jql issue custom field", with this i can configure the extra custom field with new query but there i cant set the actual issue id as a parameter ...

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2013

Ah, I see.

No, you can't do this natively, and I don't know of any plugin that would do it either. There's also a potential problem with it - if you wrote a "derived field" that does it and puts the second query on-screen in the issue navigator, then you could take out your system. Think what would happen if you queried 100 issues - that's 101 searches running before you get your results - that could be a horrendous load.

But, that warning aside, you will need to write something to provide that field.

0 votes
Fabian Toth June 19, 2013

ok imagine i have a issue type "Requirement" and a issue type "WorkPackage" ... in some workpackages are links to requirements. What i want to do, is that if i search for the issue type "Requirement" there should be a column which show me the result of an JQL Statement, but the JQL Statement must be depending on the Issue ID from the respective "search result line". Do you know what i mean?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2013

No, I'm afraid I still don't understand. I see that you have a search result in the issue navigator, but you want another search in it? The point of the issue navigator is that it returns the data for what you searched for.

I don't understand the content of the column. The best I can get is that you want the column to have "links to requirements" - you could try the "links" field which will display all the issue links? Would that be a good start? (Either for what you need, or to help me understand?)

0 votes
Fabian Toth June 19, 2013
thanks, but my main problem is not to show the field at the columns. How can i make a variable JQL Statement in a custom field? Something like: Type = "xyz" and Field1 = issue.id and for the issue.id should be filed the current issue id from the issue it is shown in the search navigator ... so that i see all my searched issues and at the right site of every found issue there is a columns which show the search results depending on the issue id where the result is displayed ...
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2013

I'm really sorry, I do not understand the requirement?

"issue.id should be filed the current issue.id from the issue it is shown in the issue navigator" is the bit I am stuck on.

JQL searches for issues. When you have a list of issues, you can display the data for those issues. The issue navigator is one such display, and you can choose which data items to display - so that each row in the navigator is an issue and each column a field on that issue.

I don't know what you actually want to see in the issue navigator? It does sound like you need a column/field with data X in it, but I can't work out what X is supposed to be. If that column description is correct, could you explain why X isn't simply "the content of a field"?

Suggest an answer

Log in or Sign up to answer