atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.37k stars 662 forks source link

linking the issue with epic_ticket fails #1151

Open dineshr93 opened 1 year ago

dineshr93 commented 1 year ago

Hi

While trying this example https://github.com/atlassian-api/atlassian-python-api/pull/635/commits/14ad7d33f99021815e4c69a90ba6bf8886552ce3 I got this

{'errorMessages': [], 'errors': {'epic': "Field 'epic' cannot be set. It is not on the appropriate screen, or unknown."}}

One difference though is our jira epic field doesn't have any custom id and directly mentioned as epic. issue_meta data

{
  "self": "https://jira.com/rest/api/2/issuetype/12",
  "id": "12",
  "description": "Created by Jira Software - do not edit or delete. Issue type for a big user story that needs to be broken down.",
  "iconUrl": "https://jira.com/secure/viewavatar?size=xsmall&avatarId=2308&avatarType=issuetype",
  "name": "Epic",
  "subtask": false,
  "avatarId": 2308
}

I tried issue

jira.issue_create(fields)
jira.issue_create_or_update(fields)
jira.issue_field_value(key, field)

all throws not an appropriate screen error. My epic option is only available in the edit screen. not sure how to establish issue with an epic link.

is there any way to update an existing issue with an epic ticket ?

DenVilk commented 3 months ago

Try to get issue with setted epic link and watch which field needs for it. In my case it was customfield_10102. And in object it will be smth like that:

{
    'fields': {
        'summary': title,
            'project': {
            'key': project,
                },
        'issuetype': {
            'name' : issue_type,
                },
        'assignee': {
            'name': assignee, #login
        },
        'labels': labels,
            "customfield_10102": epic.upper()
    }
}