Skip to content

Commit

Permalink
Sync with latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Apr 8, 2024
2 parents de511f4 + c52ef13 commit b457473
Show file tree
Hide file tree
Showing 15 changed files with 215 additions and 34 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## v2.57.7 - 2024-04-05

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

### Fix

- Add togglz to track PAPI events (#7021)

## v2.57.6 - 2024-04-05

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

## v2.57.5 - 2024-04-05

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

### Feature

- Alter ip column in events to for IPV6 and add event tracking to V2 (#7019)

## v2.57.4 - 2024-04-04

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

## v2.57.3 - 2024-04-04

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.57.2...v2.57.3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public enum Features implements Feature {

@Label("Registration 2.1: Add affiliations on registration")
REGISTRATION_2_1,


@Label("Registration 2.0")
REGISTRATION_2_0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import org.orcid.pojo.ajaxForm.PojoUtil;

public class AffiliationSummary {
public String organizationName;
public String url;
public String startDate;
public String endDate;
public String role;
public String type;
public boolean validated;
private String organizationName;
private String url;
private String startDate;
private String endDate;
private String role;
private String type;
private boolean validated;

public String getOrganizationName() {
return organizationName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

@XmlRootElement
public class RecordSummary {
@JsonInclude(Include.NON_NULL)
private String name;
Expand Down
3 changes: 2 additions & 1 deletion orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,6 @@
<include file="/db/updates/add_indexes_2024_02_20.xml" />
<include file="/db/updates/dw_views_with_4_months_interval.xml" />
<include file="/db/updates/add_ip_col_in_events.xml" />
<include file="/db/updates/dw_papi_event_stats.xml" />
<include file="/db/updates/alter_ip_col_in_events.xml" />
<include file="/db/updates/dw_papi_event_stats.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<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 id="ADD-FIELD-TO-EVENT" author="Daniel Palafox" dbms="hsqldb">
<preConditions onFail="MARK_RAN">
<columnExists tableName="event" columnName="ip"/>
</preConditions>
<sql>ALTER TABLE event ALTER COLUMN ip VARCHAR(60);</sql>
</changeSet>

<changeSet id="ADD-FIELD-TO-EVENT_STATS" author="Daniel Palafox" dbms="hsqldb">
<preConditions onFail="MARK_RAN">
<columnExists tableName="event_stats" columnName="ip"/>
</preConditions>
<sql>ALTER TABLE event_stats ALTER COLUMN ip VARCHAR(60);</sql>
</changeSet>

<changeSet id="ADD-FIELD-TO-EVENT" author="Daniel Palafox" dbms="postgresql">
<preConditions onFail="MARK_RAN">
<columnExists tableName="event" columnName="ip"/>
</preConditions>
<sql>ALTER TABLE event ALTER COLUMN ip TYPE VARCHAR(60);</sql>
</changeSet>

<changeSet id="ADD-FIELD-TO-EVENT_STATS" author="Daniel Palafox" dbms="postgresql">
<preConditions onFail="MARK_RAN">
<columnExists tableName="event_stats" columnName="ip"/>
</preConditions>
<sql>ALTER TABLE event_stats ALTER COLUMN ip TYPE VARCHAR(60);</sql>
</changeSet>

</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void createPapiEventStats() {
assertEquals(Integer.valueOf(10), eventStatsEntityList.get(1).getCount());

assertNull(eventStatsEntityList.get(2).getClientId());
assertEquals("104.20.228.70", eventStatsEntityList.get(2).getIp());
assertEquals("2001:db8:85a3:8d3:1319:8a2e:370:7348", eventStatsEntityList.get(2).getIp());
assertEquals(Integer.valueOf(1100), eventStatsEntityList.get(2).getCount());


Expand Down Expand Up @@ -99,7 +99,7 @@ private void createPapiEvents() {
for (int i = 0; i < 1100; i++) {
EventEntity eventEntity = new EventEntity();
eventEntity.setEventType(EventType.PAPI.getValue());
eventEntity.setIp("104.20.228.70");
eventEntity.setIp("2001:db8:85a3:8d3:1319:8a2e:370:7348");
eventEntity.setLabel("anonymous");
LocalDate date = LocalDate.now().minusDays(1);
Instant instant = date.atStartOfDay(ZoneId.systemDefault()).toInstant();
Expand Down
Loading

0 comments on commit b457473

Please sign in to comment.