Skip to content

Commit

Permalink
Merge branch 'main' into revert-7093-revert-7091-9339-delete-orgaffil…
Browse files Browse the repository at this point in the history
…iationrelation-rows-in-panoply-for-affiliations-deleted-in-the-registry
  • Loading branch information
amontenegro authored Oct 9, 2024
2 parents db9ed3e + 7ab48af commit cb431d9
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v2.66.1 - 2024-10-09

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.66.0...v2.66.1)

## v2.66.0 - 2024-10-09

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.65.6...v2.66.0)

### Feature

- map check names to their workflow files to allow for searching

## v2.65.6 - 2024-10-02

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.65.5...v2.65.6)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void addSourceToEmail(String sourceId, String email) {
@Transactional
@UpdateProfileLastModified
public boolean verifyEmail(String email) {
Query query = entityManager.createNativeQuery("update email set is_verified = true, is_current=true, last_modified=now() where trim(lower(email)) = trim(lower(:email))");
Query query = entityManager.createNativeQuery("update email set is_verified = true, is_current=true, last_modified=now(), date_verified=now() where trim(lower(email)) = trim(lower(:email))");
query.setParameter("email", email);
return query.executeUpdate() > 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
Expand All @@ -24,7 +25,8 @@ public class EmailEntity extends SourceAwareEntity<String> implements OrcidAware
private Boolean primary;
private Boolean current;
private Boolean verified;
private String visibility;
private String visibility;
private Date dateVerified;

@Override
@Id
Expand Down Expand Up @@ -90,6 +92,15 @@ public String getVisibility() {
public void setVisibility(String visibility) {
this.visibility = visibility;
}

@Column(name = "date_verified")
public Date getDateVerified() {
return dateVerified;
}

public void setDateVerified(Date dateVerified) {
this.dateVerified = dateVerified;
}

public static Map<String, EmailEntity> mapByLowerCaseEmail(Collection<EmailEntity> emailEntities) {
Map<String, EmailEntity> map = new HashMap<>();
Expand All @@ -109,5 +120,6 @@ public void clean() {
visibility= null;
verified = null;
visibility = null;
dateVerified = null;
}
}
1 change: 1 addition & 0 deletions orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,4 +404,5 @@
<include file="/db/updates/create_dw_notification.xml" />
<include file="/db/updates/create_dw_profile_email_domain.xml" />
<include file="/db/updates/add_unique_constraint_external_id_disambiguated_org.xml" />
<include file="/db/updates/add_date_verified_to_email.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

<changeSet author="Camelia Dumitru"
id="ADD-DATE-VERIFIED-COLUMN-TO-EMAIL-TABLE">
<addColumn tableName="email">
<column name="date_verified" type="Timestamp">
<constraints nullable="true" />
</column>
</addColumn>
</changeSet>
</databaseChangeLog>

0 comments on commit cb431d9

Please sign in to comment.