Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-68855

The Status Category name is inconsistent between different services - It shows up correctly on REST Calls, but is registered incorrectly on Webhooks

    XMLWordPrintable

Details

    Description

      Summary

      When inspecting the JSON payload that is by JIRA when a webhook is fired, the name of the Status Category is being registered incorrectly. Strangely, when making a call to the /rest/api/2/statuscategory endpoint, the name of the Status Category will be shown correctly:

      {
          "self": "https://yourtestinstance.atlassian.net/rest/api/2/statuscategory/2",
          "id": 2,
          "key": "new",
          "colorName": "blue-gray",
          "name": "To Do"
      }
      
      • Status Category returned on a Webhook payload
              "statusCategory": {
                "self": "https://yourtestinstance.atlassian.net/rest/api/2/statuscategory/2",
                "id": 2,
                "key": "new",
                "colorName": "blue-gray",
                "name": "New"
              }
      

      Steps to Reproduce

      1. Register a new webhook on a test instance
      2. Perform a procedure that will fire the webhook in question
      3. Inspect the JSON payload that will be sent when the webhook is fired.

      Expected Results

      The status.statusCategory.name field should present the following values:

          public static String UNDEFINED = "undefined";
          public static String TO_DO = "To Do";
          public static String IN_PROGRESS = "indeterminate";
          public static String COMPLETE = "Complete";
      

      Actual Results

      The status.statusCategory.name will show incorrect values. From a preliminary analysis, it seems that this is occurring because the interface StatusCategory.java is referencing the following values:

          public static String UNDEFINED = "undefined";
          public static String TO_DO = "new";
          public static String IN_PROGRESS = "indeterminate";
          public static String COMPLETE = "done";
      

      As these values are passed on:

      CATEGORIES = ImmutableList.<StatusCategory>of(
                      new StatusCategoryImpl(1L, UNDEFINED, "No Category", ImmutableList.<String>of(), "medium-gray", 1L),
                      new StatusCategoryImpl(2L, TO_DO, "New", ImmutableList.of("To Do"), "blue-gray", 2L),
                      new StatusCategoryImpl(4L, IN_PROGRESS, "In Progress", ImmutableList.<String>of(), "yellow", 3L),
                      new StatusCategoryImpl(3L, COMPLETE, "Complete", ImmutableList.of("Done"), "green", 4L)
              );
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rdasilva@atlassian.com Renan da Silva (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: