Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 14ba1d8

Browse files
author
sowerstl
committed
Move Code ID into a variable in sendApprovalNotification method.
1 parent af9b5ea commit 14ba1d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/gov/osti/services/Metadata.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,10 +2381,12 @@ private static void sendApprovalNotification(DOECodeMetadata md) {
23812381
return;
23822382
}
23832383

2384+
Long codeId = md.getCodeId();
2385+
23842386
String softwareTitle = md.getSoftwareTitle().replaceAll("^\\h+|\\h+$","");
23852387

23862388
email.setFrom(EMAIL_FROM);
2387-
email.setSubject("Approved -- DOE CODE ID: " + md.getCodeId() + ", " + softwareTitle);
2389+
email.setSubject("Approved -- DOE CODE ID: " + codeId + ", " + softwareTitle);
23882390
email.addTo(md.getOwner());
23892391

23902392
// if email is provided, BCC the Project Manager
@@ -2403,9 +2405,9 @@ private static void sendApprovalNotification(DOECodeMetadata md) {
24032405
msg.append("<P>Thank you -- your submitted project, DOE CODE ID: <a href=\"")
24042406
.append(SITE_URL)
24052407
.append("/biblio/")
2406-
.append(md.getCodeId())
2408+
.append(codeId)
24072409
.append("\">")
2408-
.append(md.getCodeId())
2410+
.append(codeId)
24092411
.append("</a>, has been approved. It is now <a href=\"")
24102412
.append(SITE_URL)
24112413
.append("\">searchable</a> in DOE CODE by, for example, title or CODE ID #.</P>");

0 commit comments

Comments
 (0)