diff --git a/sync-jira/src/main/kotlin/gropius/sync/jira/JiraDataService.kt b/sync-jira/src/main/kotlin/gropius/sync/jira/JiraDataService.kt index a4ce0198..4d9d5aad 100644 --- a/sync-jira/src/main/kotlin/gropius/sync/jira/JiraDataService.kt +++ b/sync-jira/src/main/kotlin/gropius/sync/jira/JiraDataService.kt @@ -136,6 +136,8 @@ class JiraDataService( /** * Get the default issue state + * @param imsProject the ims project to work on + * @param issue the issue to work on (sometimes not yet saved or complete) * @param isOpen whether the issue state is open or closed * @return the default issue state */ @@ -148,6 +150,8 @@ class JiraDataService( /** * Get the named issue state + * @param imsProject the ims project to work on + * @param issue the issue to work on (sometimes not yet saved or complete) * @param isOpen whether the issue state is open or closed * @return the default issue state */ diff --git a/sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt b/sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt index 560bf7ee..609898af 100644 --- a/sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt +++ b/sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt @@ -126,9 +126,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje ) templateEvent.createdBy().value = jiraService.mapUser(imsProject, author) templateEvent.lastModifiedBy().value = jiraService.mapUser(imsProject, author) - return listOf( - templateEvent - ) to convInfo; + return listOf(templateEvent) to convInfo; } /** @@ -183,9 +181,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje removedLabelEvent.createdBy().value = jiraService.mapUser(imsProject, author) removedLabelEvent.lastModifiedBy().value = jiraService.mapUser(imsProject, author) removedLabelEvent.removedLabel().value = jiraService.mapLabel(imsProject, removedLabel) - return listOf( - removedLabelEvent - ) to convInfo; + return listOf(removedLabelEvent) to convInfo; } return listOf() to convInfo; } @@ -196,6 +192,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje * @param imsProject the ims project * @param service the service * @param jiraService the jira service + * @param issue the issue to work on (sometimes not yet saved or complete) * @return the pair of timeline items and conversion information */ private suspend fun gropiusState( @@ -222,9 +219,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje titleChangedEvent.lastModifiedBy().value = jiraService.mapUser(imsProject, author) titleChangedEvent.oldState().value = jiraService.issueState(imsProject, issue, data.fromString == null) titleChangedEvent.newState().value = jiraService.issueState(imsProject, issue, data.toString == null) - return listOf( - titleChangedEvent - ) to convInfo; + return listOf(titleChangedEvent) to convInfo; } /** @@ -233,6 +228,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje * @param imsProject the ims project * @param service the service * @param jiraService the jira service + * @param issue the issue to work on (sometimes not yet saved or complete) * @return the pair of timeline items and conversion information */ private suspend fun gropiusNamedState( @@ -262,9 +258,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje stateChangedEvent.oldState().value = jiraService.issueState(imsProject, issue, data.fromString!!) ?: issue.state().value stateChangedEvent.newState().value = newState - return listOf( - stateChangedEvent - ) to convInfo; + return listOf(stateChangedEvent) to convInfo; } /** @@ -296,9 +290,7 @@ class JiraTimelineItem(val id: String, val created: String, val author: JsonObje ) titleChangedEvent.createdBy().value = jiraService.mapUser(imsProject, author) titleChangedEvent.lastModifiedBy().value = jiraService.mapUser(imsProject, author) - return listOf( - titleChangedEvent - ) to convInfo; + return listOf(titleChangedEvent) to convInfo; } }