diff --git a/docker-compose.yml b/docker-compose.yml index 204dac7690..800e5cc2f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,11 +47,11 @@ services: SERVICE_TAGS: dev SERVICE_NAME: mysql healthcheck: - test: mysql -u ${SS_DB_USERNAME} --password=${SS_DB_PASSWORD} ${SS_DATABASE} -e 'SHOW TABLES;' | [ $(wc -l) -gt 885 ] + test: mysql -u ${SS_DB_USERNAME} --password=${SS_DB_PASSWORD} ${SS_DATABASE} -e 'SHOW TABLES;' | [ $(wc -l) -gt 300 ] interval: 60s - timeout: 10s + timeout: 60s retries: 60 - start_period: 60s + start_period: 10s volumes: - ./docker-compose/mysql/model:/docker-entrypoint-initdb.d - /tmp/mysql/www-openstack/model:/var/lib/mysql diff --git a/elections/code/infrastructure/active_records/FoundationMember.php b/elections/code/infrastructure/active_records/FoundationMember.php index 121928391a..9f82f6b4e2 100644 --- a/elections/code/infrastructure/active_records/FoundationMember.php +++ b/elections/code/infrastructure/active_records/FoundationMember.php @@ -24,6 +24,7 @@ final class FoundationMember ( 'ShowDupesOnProfile' => "Boolean", 'ResignDate' => 'SS_Datetime', + 'IndividualMemberJoinDate' => 'SS_Datetime', ); private static $has_many = array @@ -66,6 +67,7 @@ public function resign() } $this->owner->MembershipType = IOpenStackMember::MembershipTypeCommunity; $this->owner->ResignDate = CustomMySQLDatabase::nowRfc2822(); + $this->owner->IndividualMemberJoinDate = null; } public function onBeforeDelete() @@ -97,6 +99,7 @@ public function upgradeToFoundationMember() $legalAgreement->write(); $this->owner->MembershipType = IOpenStackMember::MembershipTypeFoundation; $this->owner->ResignDate = null; + $this->owner->IndividualMemberJoinDate = null; $this->owner->write(); return true; } @@ -130,6 +133,11 @@ public function isCommunityMember() return $group || $this->isSpeaker() || $is_foundation_member; } + public function isIndividualMember():bool + { + return $this->owner->MembershipType == IOpenStackMember::MembershipTypeIndividual; + } + /** * @return bool */ diff --git a/elections/templates/Layout/EditProfilePage_election.ss b/elections/templates/Layout/EditProfilePage_election.ss index 92c406cc2b..74b8986e3d 100644 --- a/elections/templates/Layout/EditProfilePage_election.ss +++ b/elections/templates/Layout/EditProfilePage_election.ss @@ -3,7 +3,7 @@ <% require themedCSS(profile-section) %>