Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ protected JiraIssue issueToCreate(JiraIssue sourceIssue) {
if (sourceIssue.fields.assignee != null) {
destinationIssue.fields.assignee = user(sourceIssue.fields.assignee).map(this::toUser)
.orElseGet(context::notMappedAssignee);
} else {
// Because not sending an assignee just does not update it:
// See also
// https://confluence.atlassian.com/jirakb/how-to-set-assignee-to-unassigned-via-rest-api-in-jira-744721880.html
destinationIssue.fields.assignee = JiraUser.unassigned(context.projectGroup().users().mappedPropertyName());
}

return destinationIssue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ public JiraUser(String propertyName, String value) {
properties().put(propertyName, value);
}
}

public static JiraUser unassigned(String propertyName) {
return new JiraUser(propertyName, null);
}
}
3 changes: 3 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# So that we have /api prefix in all our REST paths:
quarkus.rest.path=/api
# Enable access logs, in particular to see if web hook is triggered:
quarkus.http.access-log.enabled=true
quarkus.log.category."io.quarkus.http.access-log".level=INFO
# Management endpoints:
quarkus.management.enabled=true
quarkus.management.auth.basic=true
Expand Down
Loading