Hello,
I need a list of all available custom field types and searcherKeys.
Via the Rest API there is a mehtod to create a new custom field with this parameters:
{
"name": "New custom field",
"description": "Custom field for picking groups",
"type": "com.atlassian.jira.plugin.system.customfieldtypes:grouppicker",
"searcherKey": "com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher"
}
But there is no List which types or searchKeys are available.
Did somebody know where to find it?
regards
Chris
Community moderators have prevented the ability to post new answers.
Hello,
I found a solution a while ago. You can go to this url and get the need information:
It works with the Atlassian-plugin-sdk when you use the normal DEMO-Project.
regards
Chris
I had the same question, and just looked up in the JIRA REST API browser, if there is something available. If you have a JIRA 6 installed, the following URL (with the correct server prefix) will give you a JSON object as result:
<server-url>/jira/rest/api/2/field
The result in our case was (not complete, just to give an idea):
[ {"id": "customfield_10190","name": "Reporters Org. Unit","custom": true,"orderable": true,"navigable": true,"searchable": true,"clauseNames": ["cf[10190]","Reporters Org. Unit"],"schema": {"type": "string","custom": "com.atlassian.jira.plugin.system.customfieldtypes:select","customId": 10190}}, {"id": "timespent","name": "Time Spent","custom": false,"orderable": false,"navigable": true,"searchable": false,"clauseNames": ["timespent"],"schema": {"type": "number","system": "timespent"}}, {"id": "customfield_11512","name": "Resubmission Date","custom": true,"orderable": true,"navigable": true,"searchable": true,"clauseNames": ["cf[11512]","Resubmission Date"],"schema": {"type": "date","custom": "com.atlassian.jira.plugin.system.customfieldtypes:datepicker","customId": 11512}}, ... ]
So by extracting some information, you have at least which field types are already used in defining custom fields. I am not sure who will get that information, I suspect that you have to be JIRA administrator here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right, I can't find a list either. I think part of the problem is that the list is actually variable, not fixed.
There's a load of custom field types that are bundled into a JIRA off-the-shelf, but that's not a definitive list because you can create plugins that add other types. To compound the problem, searchers are potentially many:many with the field types (e.g. a date range searcher can be used by any date based field, and a date based field could use a date range searcher or an absolute searcher)
when I've needed a rough idea of the types of custom fields in the core, I've tended to just read https://docs.atlassian.com/jira/latest/index.html?com/atlassian/jira/issue/customfields/CustomFieldType.html - the "all known implementing classes" covers all the types of built in field.
I'd hope someone else has a better answer for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To those that still end up in this page, since Atlassian hasn't yet provided proper documentation or improvements on their API, the best way to figure out the types and searcher keys is by reading the existing ones directly from the jira database:
SELECT distinct [CUSTOMFIELDTYPEKEY],[CUSTOMFIELDSEARCHERKEY]
FROM [jiradb].[jiraschema].[customfield]
where CUSTOMFIELDTYPEKEY like '%customfield%'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But that assumes that you have added a custom field of each type and you have not got any provided by Apps that do it in odd ways. Plus you could have different searchers for the same field type.
A far better way is to use the docs given in an earlier answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
True. But you can always manually create the custom fields for the type you want and check it on the DB afterwards.
Anyway, in the end the goal is the same and I can share my field types:
Types
com.atlassian.jira.plugin.system.customfieldtypes:datepicker
com.atlassian.jira.plugin.system.customfieldtypes:datetime
com.atlassian.jira.plugin.system.customfieldtypes:float
com.atlassian.jira.plugin.system.customfieldtypes:importid
com.atlassian.jira.plugin.system.customfieldtypes:labels
com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes
com.atlassian.jira.plugin.system.customfieldtypes:multiselect
com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker
com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons
com.atlassian.jira.plugin.system.customfieldtypes:select
com.atlassian.jira.plugin.system.customfieldtypes:textarea
com.atlassian.jira.plugin.system.customfieldtypes:textfield
com.atlassian.jira.plugin.system.customfieldtypes:url
com.atlassian.jira.plugin.system.customfieldtypes:userpicker
SearcherKeys
com.atlassian.jira.plugin.system.customfieldtypes:daterange
com.atlassian.jira.plugin.system.customfieldtypes:datetimerange
com.atlassian.jira.plugin.system.customfieldtypes:exactnumber
com.atlassian.jira.plugin.system.customfieldtypes:exactnumber
com.atlassian.jira.plugin.system.customfieldtypes:labelsearcher
com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher
com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher
com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher
NULL
com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher
com.atlassian.jira.plugin.system.customfieldtypes:textsearcher
com.atlassian.jira.plugin.system.customfieldtypes:textsearcher
com.atlassian.jira.plugin.system.customfieldtypes:exacttextsearcher
com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.