Let's say I have 2 projects, p1 and p2. The create issue screen for each project has customfield_1 and customfield_2 respectively.
GET api/2/filed returns all fields.
Am I correct in thinking that all fields are returned but there is no information to identify to which project the custom fields belong to?
To get around this, one way would be to prefix the custom field name with a project identifier when creating it?
Please don't do that. I have been paid professionally to clean up configurations like that. If you scale that sort of configuration out Jira will become very difficult to search and use.
Custom Fields are NOT for projects. You are thinking about it wrong. Custom Fields are more or less global. Use the createMeta and editMeta REST endpoints to discover which fields are in-use by a project. Using the Custom Field name is not a good idea.
Thanks for replies. I was thinking about this on the way home last night and came to the conclusion that custom fields are "global" to JIRA and by adding them to project screens (e.g. issue create) , they become available for use when creating an issue in the project.
Our application will need to create a custom field, then add it to a particular screen for a project. We need to associate the custom field id to a particular parameter in our projects.
The body from the results of a search, converted to a String, will need the "customfield_xxxxx" replaced by our parameter name in order to use Jackson objectmapper - since we cannot define the properties in the class they are unknown until they are created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You need to use the following rest function
rest/api/2/issue/createmeta?projectKeys=QA&expand=projects.issuetypes.fields
But it does not tell you which fields are on the screen. It will just tell you what fields are defined for the project in the layout scheme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.