Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
netphantm opened this issue Jun 27, 2024 · 0 comments
Open

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

netphantm opened this issue Jun 27, 2024 · 0 comments

Comments

@netphantm
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant