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 @@ -24,7 +24,7 @@ public class JiraWebHookListenerResource {
@Consumes(MediaType.APPLICATION_JSON)
public String somethingHappened(@RestPath @NotNull /* @ConfiguredProject */ String project,
JiraWebHookEvent event) {
Log.debugf("Received a notification about %s project: %s", project, event);
Log.infof("Received a notification about %s project: %s", project, event);
jiraService.acknowledge(project, event);
return "ack";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ private JiraUser toUser(String value) {
}

private Optional<JiraTransition> prepareTransition(JiraIssue sourceIssue) {
return statusToTransition(sourceIssue.fields.status.id).map(
tr -> new JiraTransition(tr, "Upstream issue status updated to: " + sourceIssue.fields.status.name));
return statusToTransition(sourceIssue.fields.status.id).map(JiraTransition::new);
}

protected Optional<JiraIssueLink> prepareParentLink(String destinationKey, JiraIssue sourceIssue) {
Expand Down Expand Up @@ -169,12 +168,15 @@ private String prepareDescriptionQuote(JiraIssue issue) {

Assigned to: %s.

Reported by: %s.{quote}
Reported by: %s.

Upstream status: %s.{quote}


""".formatted(issue.key, issueUri,
assignee == null ? " Unassigned" : "[%s|%s]".formatted(assignee.name(), assignee.uri()),
reporter == null ? " Unknown" : "[%s|%s]".formatted(reporter.name(), reporter.uri()));
reporter == null ? " Unknown" : "[%s|%s]".formatted(reporter.name(), reporter.uri()),
issue.fields.status != null ? issue.fields.status.name : "Unknown");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public class JiraTransition extends JiraBaseObject {
public JiraTransition() {
}

public JiraTransition(String transitionId) {
this(transitionId, null);
}

public JiraTransition(String transitionId, String comment) {
transition = new JiraIssueTransition(transitionId);
if (comment != null && !comment.isBlank()) {
Expand Down
Loading