-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
7
-
Severity 3 - Minor
-
1
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:
- Status Category returned by: GET https://yourtestinstance.atlassian.net/rest/api/2/statuscategory/2
{
"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
- Register a new webhook on a test instance
- Perform a procedure that will fire the webhook in question
- 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)
);
- is related to
-
JRACLOUD-81495 webhook sent for create issue with status other than default contains changelog from issue transition
-
- Closed
-