It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hello everybody,

I'm trying to use webhooks in my Atlassian connect addon. I add this snippet in my descriptor.json and it works

....
"webhooks": [
			{
				"name": "test",
				 "events": "jira:issue_updated",
				"filter": "project = test",
				"url": "/mainIssue",
				"excludeBody": false
			}
		]


I need to add "jira:issue_created" also without duplicating the code I tried this but it doesn't work 

"webhooks": [
			{
				"name": "test",
				 "events": [
				      "jira:issue_updated",
				      "jira:issue_created"
				    ],
				"filter": "project = test",
				"url": "/mainIssue",
				"excludeBody": false
			}
		]

 Would you have any proposition how I can specify more events ?

 

Best regards

1 answer

Hi,

You need to specify a new webhook object for each event:

....
"webhooks": [
            {
                "name": "test updated",
                 "events": "jira:issue_updated",
                "filter": "project = test",
                "url": "/mainIssue",
                "excludeBody": false
            },
            {
                "name": "test created",
                 "events": "jira:issue_created",
                "filter": "project = test",
                "url": "/mainIssue",
                "excludeBody": false
            }
        ]

Thanks,

Jon

Thanks @Jon Bevan [Adaptavist] that's what I want to avoid it. That's mean that I will duplicate the code. But if there is not any way I will do like that

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,751 views 8 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you