Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goci 321 add text success email #115

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ deploy-backend-sandbox:
environment:
name: sandbox
only:
- develop
- GOCI-321-AddText-Success-Email
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sajo-ebi , I think this is a final merge to master, but it seems this yaml file for sandbox deployment needs to be reversed from deploying "GOCI-321-AddText-Success-Email" to deploying "develop" branch


deploy-fallback:
image: dtzar/helm-kubectl:2.13.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public class BackendMailConfig {
@Value("${gwas-deposition.email-config.base-url}")
private String submissionsBaseURL;

@Value("${gwas-deposition.email-config.docs-url}")
private String submissionsDocsURL;

@Value("${gwas-deposition.email-config.errors.subject}")
private String errorsSubject;

Expand Down Expand Up @@ -61,6 +64,8 @@ public String getErrorsSubject() {
return errorsSubject;
}

public String getSubmissionsDocsURL() { return submissionsDocsURL; }

public List<String> getErrorsReceiver() {
List<String> result = new ArrayList<>();
String[] parts = errorsReceiver.split(",");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public class MailConstants {

public static final String SUBMISSION_STUDIES = "SUBMISSION_STUDIES";

public static final String SUBMISSION_DOCS_URL = "SUBMISSION_DOCS_URL";

public static final String PMID = "PMID";

public static final String FIRST_AUTHOR = "FIRST_AUTHOR";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public void checkCallbackIds() {

metadata.put(MailConstants.SUBMISSION_ID, backendMailConfig.getSubmissionsBaseURL() + submission.getId());
metadata.put(MailConstants.SUBMISSION_STUDIES, backendMailConfig.getSubmissionsBaseURL() + submission.getId());
metadata.put(MailConstants.SUBMISSION_DOCS_URL, backendMailConfig.getSubmissionsDocsURL());

String userId = submission.getCreated().getUserId();
log.info("Callback ID completed: {}", callbackId.getCallbackId());
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ gwas-deposition:
email-config:
subject: GWAS Catalog submission for %PMID%
base-url: https://www.ebi.ac.uk/gwas/deposition/submission/
docs-url: https://www.ebi.ac.uk/gwas/docs/submission#link-15
emails:
success: emails/success.email
fail: emails/fail.email
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/emails/success.email
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@

<p>Following submission the accession ID(s) for your submission will be available to download by pressing on the 'Download Study Accessions' button on the <a th:href="${SUBMISSION_STUDIES}">studies</a> page.</p>

<p>For more information about how and when your data will become publicly accessible, please see our documentation pages: <a th:href="${SUBMISSION_DOCS_URL}">Documentation</a> page.</p>

<p>Thanks for sharing your data with us.</p>

<p>Best wishes,<br/>
Expand Down