Skip to content

Commit

Permalink
Improve WIP watermark Jira notification message (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
metmajer authored Apr 3, 2020
1 parent 7164cc5 commit 457b3b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/org/ods/usecase/LeVADocumentUseCase.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class LeVADocumentUseCase extends DocGenUseCase {
DocumentType.CFTR as String
]

private static String DEVELOPER_PREVIEW_WATERMARK = "Developer Preview"
private static String WORK_IN_PROGRESS_WATERMARK = "Work in Progress"
private static String WORK_IN_PROGRESS_DOCUMENT_MESSAGE = "Attention: this document is work in progress!"
public static String DEVELOPER_PREVIEW_WATERMARK = "Developer Preview"
public static String WORK_IN_PROGRESS_WATERMARK = "Work in Progress"
public static String WORK_IN_PROGRESS_DOCUMENT_MESSAGE = "Attention: this document is work in progress!"

private JenkinsService jenkins
private JiraUseCase jiraUseCase
Expand Down
4 changes: 2 additions & 2 deletions src/org/ods/util/Project.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Project {
this.data.jira.undone.docChapters = [:]

if (this.hasWipJiraIssues()) {
def message = "The following issues were detected to be work in progress:"
def message = "Pipeline-generated documents are watermarked '${LeVADocumentUseCase.WORK_IN_PROGRESS_WATERMARK}' since the following issues are work in progress:"
this.getWipJiraIssues().each { type, keys ->
def values = keys instanceof Map ? keys.values().flatten() : keys
if (!values.isEmpty()) {
Expand Down Expand Up @@ -1045,7 +1045,7 @@ class Project {
if (!services?.jira && capabilities?.empty) {
result.remove("jira")
}

// Don't serialize temporarily stored document artefacts
result.metadata.repositories.each { repo ->
repo.data?.remove("documents")
Expand Down
2 changes: 1 addition & 1 deletion test/groovy/org/ods/util/ProjectSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ class ProjectSpec extends SpecHelper {
expected[type] = [ "${type}-1", "${type}-2" ]
}

def expectedMessage = "The following issues were detected to be work in progress:"
def expectedMessage = "Pipeline-generated documents are watermarked '${LeVADocumentUseCase.WORK_IN_PROGRESS_WATERMARK}' since the following issues are work in progress:"
Project.JiraDataItem.TYPES_WITH_STATUS.each { type ->
expectedMessage += "\n\n${type.capitalize()}: ${type}-1, ${type}-2"
}
Expand Down

0 comments on commit 457b3b5

Please sign in to comment.