Skip to content

setting some fields, like Priority or a custom field #140

@netphantm

Description

@netphantm

Hi
I want to be able to set the priority according to a list of services, like for example even if swap is CRITICAL, it can be set to medium, but if it's a disk check, it should be set to highest priority. I tried to set the 'Priority' field via templates and it doesn't work. Could that be added as an argument perhaps, like in the case of --ack-author <author>?
This is possible via an API call:

$CURL PUT 'https://$JIRA_SERVER/rest/api/2/issue/$incident_id' $HEADERS \
--data-raw '{
  "update" : {
      "priority":[{"set":{"name":"$prio"}}]
  }
}'  

where $prio is one of (Critical High Medium Low)

I wanted to set another field (using templates), like

customfield_10115 = "Monitoring"

but it won't work. If I set it manually and check the ticket over the API, this field contains the following:

    "customfield_10115": {
      "_links": {
        "jiraRest": "https://jira-dev.foobar.com/rest/api/2/issue/26825",
        "web": "https://jira-dev.foobar.com/servicedesk/customer/portal/4/SD-1241",
        "self": "https://jira-dev.foobar.com/rest/servicedeskapi/request/26825"
      },
      "requestType": {
        "id": "96",
        "_links": {
          "self": "https://jira-dev.foobar.com/rest/servicedeskapi/servicedesk/4/requesttype/96"
        },
        "name": "Monitoring",
        "description": "HQITSMXX-58",
        "helpText": "",
        "serviceDeskId": "4",
        "groupIds": [],
        "icon": {
          "id": "10632",
          "_links": {
            "iconUrls": {
              "48x48": "https://jira-dev.foobar.com/secure/viewavatar?avatarType=SD_REQTYPE&size=large&avatarId=10632",
              "24x24": "https://jira-dev.foobar.com/secure/viewavatar?avatarType=SD_REQTYPE&size=small&avatarId=10632",
              "16x16": "https://jira-dev.foobar.com/secure/viewavatar?avatarType=SD_REQTYPE&size=xsmall&avatarId=10632",
              "32x32": "https://jira-dev.foobar.com/secure/viewavatar?avatarType=SD_REQTYPE&size=medium&avatarId=10632"
            }
          }
        }
      },

can this also be set using templates somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions