Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting null project key in a Jira Cloud App sprint_started webhook

Jose A. Íñigo January 9, 2021

I'm developing a Jira Cloud Add on that will receive sprint related events:

  "modules": {
    "webhooks": [
      {
        "event": "sprint_started",
        "url": "/sprints/started?project={project.key}&id={project.id}"
      },
      {
        "event": "sprint_closed",
        "url": "/sprints/closed?project={project.key}&id={project.id}"
      }

As described in the documentation I've used the placeholders {project.key} and {project.id} to get the information about the project in which the event was triggered.

This is the controller that is invoked:

    @PostMapping(value = ["/started", "/closed"])
    fun sprintEvent(@AuthenticationPrincipal hostUser: AtlassianHostUser, @RequestParam project: String, @RequestParam id: String, @RequestBody body: Map<String, Any>): Mono<Void> {

However both project and id are null

The same thing for issue events works smoothly, receiving the project key:

  "modules": {
    "webhooks": [
      {
        "event": "jira:issue_created",
        "url": "/issues/created?project={project.key}&issue={issue.key}"
      },
    @PostMapping(value = ["/created", "/updated"])
    fun issueEvent(@AuthenticationPrincipal hostUser: AtlassianHostUser, @RequestParam project: String, @RequestParam issue: String, @RequestBody body: Map<String, Any>): Mono<Void> {

What's the problem with the sprint events?

1 answer

0 votes
Simon Ludwig
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2022

any answer ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events