Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Provide ability to use Service Desk custom fields in Automation webhooks custom payloads

Runtastic GmbH August 13, 2020

Hi Service Desk Team,

The WHY
We try to automate some of our processes. Therefore it would be usefull for us to do a webhook with a custom payload after a service request got approved.

The expectations:

We would like to add Custom Field values also into the custom payload of the webhook.

Custom Field is called `firstname` and got the id 10300

We tried to add this to the payload via ${issue.firstname} or ${issue.customfiels_10300} , but it didn't work.

Steps to reproduce:

  1. WHEN: "Status changed"
  2. IF: ""Customer Request Type" = "New employee (ISD)" AND Approvals = approved() "
  3. THEN:
    Add comment: "AUTOMATION issue matched webhook triggered"
    Webhook: URL hhtp://someserver:8080 Body:
{
"description":"${issue.description}",
"key":"${issue.key}",
"eventuser":"${event.user.name}",
"summary":"${issue.summary}",
"firstname": "${issue.firstname}"
}



This resulted in this payload on the service that resived the request:

{
"description" => "asfasf",
"key" => "ISD-9",
"eventuser" => "",
"summary" => "My Summary",
"firstname" => "${issue.firstname}"
}


The question:

Is there a solution to add Custom Fields to a custom paylod of a automation webhook in Jira Service Desk Server Version?

Best Regards
Gerhard

 

1 answer

2 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2020

Hi,

Thanks for posting a very detailed description of what you are trying to do here.  Unfortunately, Jira Service Desk (JSD) Server has a limited number of predefined fields that can be included in the payload when sending a webhook via the automation built into JSD.  This does not currently extend itself to any of the custom fields.

That said, I am aware of at least one other solution that might help.  I know that the Automation for Jira Server plugin can do this.  You can see under the Actions page there is the option to Send a Web request.  Please note that the Lite version of that plugin cannot send webhooks, something to keep in mind if you decide to use this solution. I have tested this out and can confirm that when this plugin is installed, you can use the Project settings->project automation in order to create a new automation rule to configure this (please note this is a different type of automation found in Project settings -> Automation). This plugin was created by codebarrel, who were acquired by Atlassian a few months ago.  This is technically different code to handle automation than what JSD Server is currently using.  In my own example, I used a payload of

{
"key":"{{issue.key}}",
"field1":"{{issue.testtext}}"
}

where 'testtext' is the name of a custom field I created and that issue had a value for.  I confirmed that the webhook when sent by this plugin is able to send custom field value correctly.  More details on the use of smart values automation in What are smart values?

There also might be other solutions in Marketplace, but I am not certain of one that would conform to the request of automation sending a webhook like this.

I have not been able to find any other existing feature requests that I think match this desired functionality in the JSDSERVER project on JAC.  We could create a suggestion type ticket for this functionality, but there is no guarantee that this would be implemented within Jira Service Desk Server.  Meanwhile, Jira Cloud already has this type of automation built into it as well, just something I wanted you to be aware of.

I hope this helps.  Please let me know your thoughts.

Andy

Gerhard Sulzberger August 20, 2020

Hi Andy,

 

Thank you for the detailed answer and the hint with the plugin.
We would vote to see this feature also in JSDSERVER, because automation is one reason why we would use JSDSERVER.
Please create the suggestion type ticket, perhaps also other customers vote for it.


Thank you,
Gerhard

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 21, 2020

Hi Gerhard,

I created a suggestion for this over in JSDSERVER-6970.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
4.11.0
TAGS
AUG Leaders

Atlassian Community Events