Skip to content

Commit

Permalink
fix: Add new email schedule to send email to encourage email to add w…
Browse files Browse the repository at this point in the history
…orks
  • Loading branch information
DanielPalafox committed Nov 22, 2023
1 parent e863322 commit 1d872f9
Show file tree
Hide file tree
Showing 19 changed files with 494 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,8 @@ source_file = orcid-core/src/main/resources/i18n/notification_share_en.propertie
source_lang = en
type = UNICODEPROPERTIES

[o:orcid-inc-1:p:registry:r:email-add-work]
file_filter = orcid-core/src/main/resources/i18n/email_add_works_to_record_<lang>.properties
source_file = orcid-core/src/main/resources/i18n/email_add_works_to_record_en.properties
source_lang = en
type = UNICODEPROPERTIES
5 changes: 4 additions & 1 deletion orcid-core/src/main/java/org/orcid/core/togglz/Features.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ public enum Features implements Feature {
ENABLE_NEW_IDS,

@Label("Send verification emails for 2, 7 and 28 days. If disabled 2 days only verification emails will be sent.")
SEND_ALL_VERIFICATION_EMAILS;
SEND_ALL_VERIFICATION_EMAILS,

@Label("Send add works emails for 7, 28 and 90 days.")
SEND_ADD_WORKS_EMAILS;

public boolean isActive() {
return FeatureContext.getFeatureManager().isActive(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
email.addWorks.subject=[ORCID] Add Research Outputs to your ORCID record

email.addWorks.header.yourOrcidId=Your ORCID iD:
email.addWorks.header.yourOrcidRecordIs=Your ORCID record is
email.addWorks.header.dear=Dear

email.addWorks.weHaveNoticed=We have noticed that you have not yet added any research outputs to your ORCID record. Adding these will help reduce your administrative burden when read and imported into other systems, ensure you are recognized for your research contributions, and disambiguate you from other researchers with the same name!
email.addWorks.getStarted=Get started with these popular ORCID integrations:
email.addWorks.belowAreLinks=Below are links to 4 popular ORCID integrations that allow you to sign in to your OCID record, grant permission to the service to add your selected research outputs to your ORCID record.

email.addWorks.forAddingJournal=For adding journal articles:
email.addWorks.allowsYouToSearch=allows you to search and add works by title or DOI.

email.addWorks.forAddingLife=For adding life sciences literature:
email.addWorks.allowsYouToImport=allows you to import works from the Europe PubMed database, which includes all articles indexed by PubMed Central.

email.addWorks.forAddingMultiple=For adding multiple published articles:
email.addWorks.allowsYouToAddYourScopus=allows you to add your Scopus Author ID to your record as well as importing works associated with your Scopus Author ID.

email.addWorks.allowsYouClaim=allows you to claim and import works from the Bielefeld Academic Search Engine. To use, you must first create a BASE user account. Recommended for authors of open access publications.

email.addWorks.weHaveSeachAndLink=We have more `search and link` wizards available within
email.addWorks.yourOrcidRecord=your ORCID record

email.addWorks.ifYouAreHavingTrouble=If you are having trouble adding your research outputs or you would like to know more about how to add data to your ORCID record, please visit our
email.addWorks.orcidHelpCenter=ORCID Help Center

email.addWorks.footer.warmRegards=Warm Regards,
email.addWorks.footer.orcidSupportTeam=ORCID Support Team
email.addWorks.footer.youHaveReceivedThisEmail=You have received this email because you opted in to tips and features emails from ORCID. You can opt out of these at
email.addWorks.footer.accountSettings=account settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
email.addWorks.subject=LR

email.addWorks.header.yourOrcidId=LR
email.addWorks.header.yourOrcidRecordIs=LR
email.addWorks.header.dear=LR

email.addWorks.weHaveNoticed=LR
email.addWorks.getStarted=LR
email.addWorks.belowAreLinks=LR

email.addWorks.forAddingJournal=LR
email.addWorks.allowsYouToSearch=LR

email.addWorks.forAddingLife=LR
email.addWorks.allowsYouToImport=LR

email.addWorks.forAddingMultiple=LR
email.addWorks.allowsYouToAddYourScopus=LR

email.addWorks.allowsYouClaim=LR

email.addWorks.weHaveSeachAndLink=LR
email.addWorks.yourOrcidRecord=LR

email.addWorks.ifYouAreHavingTrouble=LR
email.addWorks.orcidHelpCenter=LR

email.addWorks.footer.warmRegards=LR
email.addWorks.footer.orcidSupportTeam=LR
email.addWorks.footer.youHaveReceivedThisEmail=LR
email.addWorks.footer.accountSettings=LRa
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
email.addWorks.subject=RL

email.addWorks.header.yourOrcidId=RL
email.addWorks.header.yourOrcidRecordIs=RL
email.addWorks.header.dear=RL

email.addWorks.weHaveNoticed=RL
email.addWorks.getStarted=RL
email.addWorks.belowAreLinks=RL

email.addWorks.forAddingJournal=RL
email.addWorks.allowsYouToSearch=RL

email.addWorks.forAddingLife=RL
email.addWorks.allowsYouToImport=RL

email.addWorks.forAddingMultiple=RL
email.addWorks.allowsYouToAddYourScopus=RL

email.addWorks.allowsYouClaim=RL

email.addWorks.weHaveSeachAndLink=RL
email.addWorks.yourOrcidRecord=RL

email.addWorks.ifYouAreHavingTrouble=RL
email.addWorks.orcidHelpCenter=RL

email.addWorks.footer.warmRegards=RL
email.addWorks.footer.orcidSupportTeam=RL
email.addWorks.footer.youHaveReceivedThisEmail=RL
email.addWorks.footer.accountSettings=RLa
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
email.addWorks.subject=XX

email.addWorks.header.yourOrcidId=XX
email.addWorks.header.yourOrcidRecordIs=XX
email.addWorks.header.dear=XX

email.addWorks.weHaveNoticed=XX
email.addWorks.getStarted=XX
email.addWorks.belowAreLinks=XX

email.addWorks.forAddingJournal=XX
email.addWorks.allowsYouToSearch=XX

email.addWorks.forAddingLife=XX
email.addWorks.allowsYouToImport=XX

email.addWorks.forAddingMultiple=XX
email.addWorks.allowsYouToAddYourScopus=XX

email.addWorks.allowsYouClaim=XX

email.addWorks.weHaveSeachAndLink=XX
email.addWorks.yourOrcidRecord=XX

email.addWorks.ifYouAreHavingTrouble=XX
email.addWorks.orcidHelpCenter=XX

email.addWorks.footer.warmRegards=XX
email.addWorks.footer.orcidSupportTeam=XX
email.addWorks.footer.youHaveReceivedThisEmail=XX
email.addWorks.footer.accountSettings=XXa
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ email.subject.auto_deprecate=[ORCID] An account has been deprecated
email.subject.reactivation=[ORCID] Reactivating your ORCID record
email.subject.register.welcome=[ORCID] Welcome to ORCID
email.subject.delegate.recipient=[ORCID] You've made an Account Delegate!
email.subject.add_works=[ORCID] Add Research Outputs to your ORCID record
4 changes: 2 additions & 2 deletions orcid-core/src/main/resources/orcid-core-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -772,14 +772,14 @@

<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate" />
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record" />
<property name="defaultEncoding" value="UTF-8" />
<property name="cacheSeconds" value="${org.orcid.core.messages.cacheSeconds:5}" />
</bean>

<bean id="messageSourceNoFallback"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate" />
<property name="basenames" value="classpath:i18n/about,classpath:i18n/api,classpath:i18n/email_admin_delegate_request,classpath:i18n/email_added_as_delegate,classpath:i18n/email_auto_deprecate,classpath:i18n/email_new_claim_reminder,classpath:i18n/email_common,classpath:i18n/email_deactivate,classpath:i18n/email_digest,classpath:i18n/email_forgotten_id,classpath:i18n/email_institutional_connection,classpath:i18n/email_locked,classpath:i18n/email_notification,classpath:i18n/email_reactivation,classpath:i18n/email_removed,classpath:i18n/email_reset_password,classpath:i18n/email_reset_password_not_found,classpath:i18n/email_subject,classpath:i18n/email_tips,classpath:i18n/email_verify,classpath:i18n/email_welcome,classpath:i18n/javascript,classpath:i18n/messages,classpath:i18n/admin,classpath:i18n/identifiers,classpath:i18n/notranslate,classpath:i18n/2019-07-emailVisibilitySettings,classpath:i18n/ng_orcid,classpath:i18n/ng_orcid_signin,classpath:i18n/email2faDisabled,classpath:i18n/layout,classpath:i18n/notification_share,classpath:i18n/notification_digest,classpath:i18n/notification_delegate,classpath:i18n/notification_announcement,classpath:i18n/notification_admin_delegate,classpath:i18n/email_add_works_to_record" />
<property name="defaultEncoding" value="UTF-8" />
<property name="cacheSeconds" value="${org.orcid.core.messages.cacheSeconds:5}" />
<property name="fallbackToSystemLocale" value="false" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<#import "email_macros.ftl" as emailMacros />
<@emailMacros.msg "email.addWorks.header.yourOrcidId" /> ${orcidId}
<@emailMacros.msg "email.addWorks.header.yourOrcidRecordIs" /> ${baseUri}/${orcidId}

<@emailMacros.msg "email.common.dear" /> ${emailName}

<@emailMacros.msg "email.addWorks.weHaveNoticed" />


<@emailMacros.msg "email.addWorks.getStarted" />


<@emailMacros.msg "email.addWorks.belowAreLinks" />


<@emailMacros.msg "email.addWorks.forAddingJournal" /><@emailMacros.space />Crossref Metadata Search<@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToSearch" />

<@emailMacros.msg "email.addWorks.forAddingLife" /><@emailMacros.space />Europe PubMed Central<@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToImport" />

<@emailMacros.msg "email.addWorks.forAddingMultiple" /><@emailMacros.space />Scopus<@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToAddYourScopus" />

BASE (Bielefeld Academic Search Engine)<@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouClaim" />

<@emailMacros.msg "email.addWorks.weHaveSeachAndLink" /><@emailMacros.space /><@emailMacros.msg "email.addWorks.yourOrcidRecord" />.

<@emailMacros.msg "email.addWorks.ifYouAreHavingTrouble" /><@emailMacros.space /><@emailMacros.msg "email.addWorks.orcidHelpCenter" />.

<@emailMacros.msg "email.addWorks.footer.warmRegards" />

<@emailMacros.msg "email.addWorks.footer.orcidSupportTeam" />

https://support.orcid.org

<@emailMacros.msg "email.addWorks.footer.youHaveReceivedThisEmail" /><@emailMacros.space /><@emailMacros.msg "email.addWorks.footer.accountSettings" />.
<@emailMacros.msg "email.common.email.preferences" /> | <@emailMacros.msg "email.common.privacy_policy" /> | <@emailMacros.msg "email.common.address1" /> | <@emailMacros.msg "email.common.address2" /> | ORCID.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<#import "email_macros.ftl" as emailMacros />
<#escape x as x?html>
<!DOCTYPE html>
<html>
<head>
<title>${subject}</title>
</head>
<body>
<div style="
max-width: 580px;
padding: 32px;
margin: auto;
font-family: Arial, helvetica, sans-serif;
color: #494A4C;
font-size: 15px;
line-height: 1.5;
">
<div style="line-height: 1.5;">
<p>
<@emailMacros.msg "email.addWorks.header.yourOrcidId" /> ${orcidId}
<br>
<@emailMacros.msg "email.addWorks.header.yourOrcidRecordIs" /> <a
style="text-decoration: underline;color: #085c77;" href="${baseUri}/${orcidId}"
target="_blank">${baseUri}/${orcidId}</a>
</p>
<p><@emailMacros.msg "email.common.dear" /><@emailMacros.space />${emailName}</p>
</div>
<div style="display: block">
<p><@emailMacros.msg "email.addWorks.weHaveNoticed" /></p>
<p style="font-weight: bolder;font-size: 16px"><@emailMacros.msg "email.addWorks.getStarted" /></p>
<p><@emailMacros.msg "email.addWorks.belowAreLinks" /></p>
<p><@emailMacros.msg "email.addWorks.forAddingJournal" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://orcid.org/oauth/authorize?client_id=0000-0002-3054-1567&response_type=code&scope=%2Fread-limited%20%2Factivities%2Fupdate&redirect_uri=https:%2F%2Fsearch.crossref.org%2Fauth%2Forcid%2Fimport"
target="_blank">Crossref Metadata Search</a><@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToSearch" /></p>
<p><@emailMacros.msg "email.addWorks.forAddingLife" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://orcid.org/oauth/authorize?client_id=0000-0002-9157-3431&response_type=code&scope=%2Fread-limited%20%2Factivities%2Fupdate&redirect_uri=https:%2F%2Feuropepmc.org%2Forcid%2Fimport"
target="_blank">Europe PubMed Central</a><@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToImport" /></p>
<p><@emailMacros.msg "email.addWorks.forAddingMultiple" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://orcid.org/oauth/authorize?client_id=0000-0002-5982-8983&response_type=code&scope=%2Fperson%2Fupdate%20%2Fread-limited%20%2Factivities%2Fupdate&redirect_uri=https:%2F%2Forcid.scopusfeedback.com%2Finward%2Forcid"
target="_blank">Scopus</a><@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouToAddYourScopus" />
</p>
<p><a style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://orcid.org/oauth/authorize?client_id=APP-HCGH49OO61VH1II3&response_type=code&scope=%2Fread-limited%20%2Factivities%2Fupdate&redirect_uri=https:%2F%2Fwww.base-search.net%2FSearch%2FOrcidSearchLink"
target="_blank">BASE</a> (Bielefeld Academic Search Engine)<@emailMacros.space /><@emailMacros.msg "email.addWorks.allowsYouClaim" /></p>
<p><@emailMacros.msg "email.addWorks.weHaveSeachAndLink" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://testserver.orcid.org/my-orcid"
target="_blank"><@emailMacros.msg "email.addWorks.yourOrcidRecord" /></a>.</p>
<p><@emailMacros.msg "email.addWorks.ifYouAreHavingTrouble" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://support.orcid.org/hc/en-us/articles/360006973133-Add-works-to-your-ORCID-record"
target="_blank"><@emailMacros.msg "email.addWorks.orcidHelpCenter" /></a>.</p>
<p><@emailMacros.msg "email.addWorks.footer.warmRegards" />
<br>
<@emailMacros.msg "email.addWorks.footer.orcidSupportTeam" />
</p>
<a style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://support.orcid.org/hc/en-us" target="_blank">https://support.orcid.org</a>
</div>
<footer style="display: inline-block;font-size: 13px !important;">
<p>
<@emailMacros.msg "email.addWorks.footer.youHaveReceivedThisEmail" /><@emailMacros.space /><a
style="text-decoration: underline;color: #085c77;" href="${baseUri}/account"
target="_blank"><@emailMacros.msg "email.addWorks.footer.accountSettings" /></a>.
</p>
<p>
<a style="text-decoration: underline;color: #085c77;display: inline-block;"
href="${baseUri}/account" target="_blank"
><@emailMacros.msg "email.common.email.preferences" /></a
> | <a style="text-decoration: underline;color: #085c77;display: inline-block;"
href="https://orcid.org/footer/privacy-policy" target="_blank"
><@emailMacros.msg "email.common.privacy_policy" /></a> |
<b><@emailMacros.msg "email.common.address1" /></b> | <@emailMacros.msg "email.common.address2" /> |
<a
style="text-decoration: underline;color: #085c77;"
href="${baseUri}"
target="_blank"
>ORCID.org</a>
</p>
</footer>
</div>
</body>
</html>
</#escape>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.lang3.tuple.Triple;
import org.orcid.persistence.jpa.entities.EmailEventType;
import org.orcid.persistence.jpa.entities.IndexingStatus;
Expand Down Expand Up @@ -162,4 +163,6 @@ public interface ProfileDao extends GenericDao<ProfileEntity, String> {
public void updateSigninLock(String orcid, Integer count);

boolean haveMemberPushedWorksOrAffiliationsToRecord(String orcid, String clientId);

public List<Pair<String, String>> findEmailsToSendAddWorksEmail();
}
Loading

0 comments on commit 1d872f9

Please sign in to comment.