Skip to content

Commit

Permalink
dokka
Browse files Browse the repository at this point in the history
  • Loading branch information
chriku committed Sep 22, 2024
1 parent 069c118 commit 49617d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down
22 changes: 7 additions & 15 deletions sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<TimelineItem>(
templateEvent
) to convInfo;
return listOf<TimelineItem>(templateEvent) to convInfo;
}

/**
Expand Down Expand Up @@ -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<TimelineItem>(
removedLabelEvent
) to convInfo;
return listOf<TimelineItem>(removedLabelEvent) to convInfo;
}
return listOf<TimelineItem>() to convInfo;
}
Expand All @@ -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(
Expand All @@ -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<TimelineItem>(
titleChangedEvent
) to convInfo;
return listOf<TimelineItem>(titleChangedEvent) to convInfo;
}

/**
Expand All @@ -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(
Expand Down Expand Up @@ -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<TimelineItem>(
stateChangedEvent
) to convInfo;
return listOf<TimelineItem>(stateChangedEvent) to convInfo;
}

/**
Expand Down Expand Up @@ -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<TimelineItem>(
titleChangedEvent
) to convInfo;
return listOf<TimelineItem>(titleChangedEvent) to convInfo;
}
}

Expand Down

0 comments on commit 49617d1

Please sign in to comment.