How to create date time and cascading issue field for cloud App

Hi Experts,

How to create a date-time picker issue field and cascading issue field using issue field module?
@acalantog @epehrson @kkercz

Link:
https://developer.atlassian.com/cloud/jira/platform/modules/issue-field/

atlassian-connect.json file:

"jiraIssueFields": [
			{
				"key": "purchase-date",
				"name": {
					"value": "Purchase Date"
				},
				"description": {
					"value": "Purchase date"
				},
				"type": "datetime"
				
			}
		]

Error:

1 Like

Hi @dchouksey89,

It looks like the Issue Field module doesn’t support creating date and time issue fields, but the REST API does. See https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-field-post.

Regards,
Dugald

@dmorrow ,

If I use API to create a custom field for my app then May I use below fields option API for app to manipulate field option without any admin permission?

Juts example for cascading select option.

Here is my use Case: I want to manipulate options for my apps fields without admin permission for JIRA user

Fields option API Link: (Jira permissions are not required for the app providing the field)
https://developer.atlassian.com/cloud/jira/platform/rest/v3/?_ga=2.94877276.1954245784.1591590189-659782430.1585675843#api-group-Issue-custom-field-options--apps-

Hi @dchouksey89 @dmorrow ,

We are also facing the same problem with date-time picker field creation. How to resolve it or is there any alternatives to handle this using ‘jiraIssueFields’?

Hi @hariprasath

You need to use addon permission(not user permission) to create custom fields.

Spring Boot Solution
Syntax: atlassianHostRestClients.authenticatedAsAddon()

 atlassianHostRestClients.authenticatedAsAddon().postForObject("/rest/api/3/field", customFieldRequest, CustomFieldResponse.class);