Details
-
Bug
-
Resolution: Timed out
-
Low
-
3
-
Severity 3 - Minor
-
Description
Issue Summary
You can import issues along with Sub-tasks via JSON with the following structure:
{ "links": [ { "name": "sub-task-link", "sourceId": "2", "destinationId": "1" } ], "projects": [{ "name" : "Bug 2 the return", "key" : "B2R", "description" : "description", "issues": [ { "priority" : "High", "description" : "Test JSON", "issueType" : "Task", "summary" : "Json test", "externalId" : "1" }, { "issueType": "Sub-task", "summary" : "Sub-task Json", "externalId": "2" } ] } ] }
Or via CSV with the following one: Jira.csv
Currently, although the relation seems to be created when importing those into team-managed projects, that does not reflect in the issue view:
Steps to Reproduce
- Import a JSON file into a Next-gen project with the structure above.
Expected Results
The parent/sub-task relation will be created and will reflect in the issue view.
Actual Results
The relation is created in the back-end, and we can see it in the issue search navigation. But that does not reflect in the issue view of the team-managed projects.
Workaround
I was able to create sub-tasks under an issue in a team-managed project by using the endpoint Create issue.
Example:
- Call:
curl --request POST \ --url 'https://unlimitedjiraworks.atlassian.net/rest/api/3/issue' \ --user '<EMAIL_ADDRESS>:<API_TOKEN>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "fields": { "summary": "Main order flow broken", "parent": { "key": "N1-18" }, "issuetype": { "id": "10049" }, "project": { "id": "10029" }, "description": { "type": "doc", "version": 1, "content": [ { "type": "paragraph", "content": [ { "text": "Sub-task via REST API", "type": "text" } ] } ] } } }'
- Result:
You can get the Id of the project by viewing it trough the endpoint Get projects paginated.
You can get the Ids of the issue types of the project by accessing the desired issue type in the project settings, then looking at the URL:
Attachments
Issue Links
- relates to
-
JSWCLOUD-18580 JSON import is skipping "issuetype" parameter in team-managed projects.
- Closed
- mentioned in
-
Page Loading...