How can i get the current issue issue type

I’m trying to limit the execution of a function for some issuetype in the index.js file

But i’m not able to retriev the current issue issue type

i’m using ACE

Please i’m blocked

Hi @AchrafMECHTA,

If you are looking to retrieve an issue’s issue type, try the Get issue REST API. In order to limit the response to just the issue type try using the fields query parameter, here’s an example:

Request:

GET /rest/api/2/issue/TEST-1?fields=issuetype

Response:

{
    "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
    "id": "10000",
    "self": "https://myinstance.atlassian.net/rest/api/2/issue/10000",
    "key": "TEST-1",
    "fields":
    {
        "issuetype":
        {
            "self": "https://myinstance.atlassian.net/rest/api/2/issuetype/10001",
            "id": "10001",
            "description": "Functionality or a feature expressed as a user goal.",
            "iconUrl": "https://myinstance.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium",
            "name": "Story",
            "subtask": false,
            "avatarId": 10315,
            "hierarchyLevel": 0
        }
    }
}

Cheers,
Ian