Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/semver-regex-3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBlanski authored Nov 21, 2024
2 parents 7b8420d + e593957 commit 0dc722e
Show file tree
Hide file tree
Showing 58 changed files with 208 additions and 340 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#ECCN: Open Source
#GUSINFO: Education Data Architecture (EDA), Education Data Architecture (EDA)

#GUSINFO: Rad-ish, Education Data Architecture & K-12 (MP)
*
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The EDA framework, supported by the Salesforce Platform, can serve as the founda

## Get EDA

The easiest way to get started with EDA is to sign up for a <a href="https://www.salesforce.org/trial/eda/" target="_blank">trial</a>. If you need to install EDA in an existing Salesforce org, use the <a href="https://install.salesforce.org/products/eda" target="_blank">EDA Installer</a>. See <a href="https://powerofus.force.com/s/article/EDA-Install-and-Configure" target="_blank">Install EDA</a> for more information.
The easiest way to get started with EDA is to sign up for a <a href="https://www.salesforce.org/trial/eda/" target="_blank">trial</a>. If you need to install EDA in an existing Salesforce org, use the <a href="https://install.salesforce.org/products/eda" target="_blank">EDA Installer</a>.

## Contribute to EDA

Expand Down Expand Up @@ -42,12 +42,12 @@ Make sure `yarn` is installed on your local machine. For more information, check

* <a href="https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000kHi4SAE" target="_blank">Ask questions or get help</a>
* <a href="https://ideas.salesforce.com/s/search?filter=Education#t=All&sort=relevancy&f:@sfcategoryfull=[Education%7CEducation%20Data%20Architecture]" target="_blank">Feature Request</a>
* <a href="https://powerofus.force.com/EDA-Documentation" target="_blank">User Documentation</a>
* Check out existing <a href="https://github.com/SalesforceFoundation/EDA/labels/bug" target="_blank">bugs</a> and <a href="https://trailblazer.salesforce.com/ideaSearch?filter=Education+%3E+Education+Data+Architecture" target="_blank">feature and enhancement requests</a>
* <a href="https://github.com/SalesforceFoundation/EDA/releases" target="_blank">Release Notes and Beta Releases</a>
* Learn about EDA objects and fields, see <a href="https://powerofus.force.com/EDA_Data_Dictionary" target="_blank">EDA Data Dictionary</a>.

## Meta

The Education Data Architecture technology (“EDA”) is an open-source package licensed by Salesforce.org (“SFDO”) under the BSD-3 Clause License, found at https://opensource.org/licenses/BSD-3-Clause. ANY MASTER SUBSCRIPTION AGREEMENT YOU OR YOUR ENTITY MAY HAVE WITH SFDO DOES NOT APPLY TO YOUR USE OF EDA. EDA IS PROVIDED “AS IS” AND AS AVAILABLE, AND SFDO MAKES NO WARRANTY OF ANY KIND REGARDING EDA, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, FREEDOM FROM DEFECTS OR NON-INFRINGEMENT, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW.
SFDO WILL HAVE NO LIABILITY ARISING OUT OF OR RELATED TO YOUR USE OF EDA FOR ANY DIRECT DAMAGES OR FOR ANY LOST PROFITS, REVENUES, GOODWILL OR INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, COVER, BUSINESS INTERRUPTION OR PUNITIVE DAMAGES, WHETHER AN ACTION IS IN CONTRACT OR TORT AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF A REMEDY OTHERWISE FAILS OF ITS ESSENTIAL PURPOSE. THE FOREGOING DISCLAIMER WILL NOT APPLY TO THE EXTENT PROHIBITED BY LAW. SFDO DISCLAIMS ALL LIABILITY AND INDEMNIFICATION OBLIGATIONS FOR ANY HARM OR DAMAGES CAUSED BY ANY THIRD-PARTY HOSTING PROVIDERS.
SFDO WILL HAVE NO LIABILITY ARISING OUT OF OR RELATED TO YOUR USE OF EDA FOR ANY DIRECT DAMAGES OR FOR ANY LOST PROFITS, REVENUES, GOODWILL OR INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, COVER, BUSINESS INTERRUPTION OR PUNITIVE DAMAGES, WHETHER AN ACTION IS IN CONTRACT OR TORT AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF A REMEDY OTHERWISE FAILS OF ITS ESSENTIAL PURPOSE. THE FOREGOING DISCLAIMER WILL NOT APPLY TO THE EXTENT PROHIBITED BY LAW. SFDO DISCLAIMS ALL LIABILITY AND INDEMNIFICATION OBLIGATIONS FOR ANY HARM OR DAMAGES CAUSED BY ANY THIRD-PARTY HOSTING PROVIDERS.

(Release 244)
14 changes: 12 additions & 2 deletions cumulusci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimum_cumulusci_version: 3.9.0
minimum_cumulusci_version: 3.74.0
project:
name: EDA
package:
Expand Down Expand Up @@ -231,7 +231,7 @@ tasks:
description: "Create a user with no access to Education Cloud components"
class_path: cumulusci.tasks.sfdx.SFDXOrgTask
options:
command: "force:user:create -a no_access --definitionfile datasets/dev/users/user-def_no-access.json"
command: "force:user:create -a no_access --definitionfile datasets/dev_data/users/user-def_no-access.json"

create_tenant_secret:
group: "EDA: Shield Platform Encryption"
Expand Down Expand Up @@ -319,6 +319,11 @@ tasks:
path: scripts/setup.cls
apex: qaSetup();

github_release:
options:
release_content: |
Check out the Salesforce Release Notes on [Salesforce Help & Training](https://sfdc.co/bnL4Cb).
github_release_notes:
options:
trial_info: "`TBD`"
Expand Down Expand Up @@ -623,6 +628,11 @@ flows:
2:
flow: run_functional_tests

release_production:
steps:
3:
task: None

run_functional_tests:
# description: Configure an org for use as a dev org after package metadata is deployed.
steps:
Expand Down
File renamed without changes.
6 changes: 0 additions & 6 deletions force-app/main/default/aura/STG_CMP_Affl/STG_CMP_Affl.cmp
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,6 @@
<div aura:id="mappingsTabContent" class="slds-tabs__content" role="tabpanel">
<div class="slds-col slds-size--1-of-1 slds-m-bottom--medium">
<ui:outputText value="{!$Label.c.AfflMappingsDescription + ' '}" class="slds-text-body--small" />
<ui:outputURL
value="https://powerofus.force.com/EDA-Create-Accounts-and-Affiliations"
class="slds-text-body--small slds-type-focus"
label="EDA documentation."
target="_blank"
/>
</div>
<div class="slds-grid slds-wrap">
<div class="slds-col slds-size--1-of-6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
createDescription: function (event, component) {
var description = $A.get("$Label.c.stgEDASettingsHasMovedDesc");
var tellMeMore = $A.get("$Label.c.stgTellMeMoreLink");
const edaDocumentation = '<a href="https://powerofus.force.com/EDA-Education-Cloud-Settings">';

component.set("v.settingsMovedDesc", description + " " + edaDocumentation + tellMeMore + "</a>");
component.set("v.settingsMovedDesc", description + "</a>");
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public class ACCT_IndividualAccounts_TDTM extends TDTM_Runnable {
private void handleInsertProcessing(HandleInsertWrapperLogic insertWrapper, List<Contact> contactsNeedAccounts) {
DmlWrapper dmlWrapper = new DmlWrapper();

if (triggerAction == TDTM_Runnable.Action.AfterInsert) {
if (triggerAction == TDTM_Runnable.Action.AfterInsert && insertWrapper != null) {
//Creates new Account
if (contactsNeedAccounts.size() > 0) {
UTIL_Debug.debug('****Number of Contacts that need Accounts created: ' + contactsNeedAccounts.size());
Expand Down Expand Up @@ -497,7 +497,7 @@ public class ACCT_IndividualAccounts_TDTM extends TDTM_Runnable {
Map<Id, sObject> idToSObjectTobeUpdated = new Map<Id, sObject>();
List<sObject> duplicateOccurence = new List<sObject>();

if (triggerAction == TDTM_Runnable.Action.AfterUpdate) {
if (triggerAction == TDTM_Runnable.Action.AfterUpdate && updateWrapper != null) {
//Creates new Account
if (contactsNeedAccounts.size() > 0) {
UTIL_Debug.debug('****Number of Contacts that need Accounts created: ' + contactsNeedAccounts.size());
Expand Down
47 changes: 47 additions & 0 deletions force-app/main/default/classes/ACCT_IndividualAccounts_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -3133,4 +3133,51 @@ private class ACCT_IndividualAccounts_TEST {

System.assertEquals('test 0 Administrative Account', accAfterUpdate.Name);
}

@isTest
public static void filterInsertWithNoRecords() {
List<TDTM_Global_API.TdtmToken> tokens = TDTM_Global_API.getTdtmConfig();
TDTM_Global_API.setTdtmConfig(tokens);

//Creating filter condition
Trigger_Handler__c handler = [select Filter_Field__c from Trigger_Handler__c where Class__c = 'ACCT_IndividualAccounts_TDTM'];
handler.Filter_Field__c = 'Deceased__c';
handler.Filter_Value__c = 'true';
update handler;

Test.startTest();

Contact deceasedContact = new Contact(LastName='Deceased', Deceased__c = true);
insert deceasedContact;
Contact theContact = [select Deceased__c from Contact where id = :deceasedContact.Id];
System.assertEquals(theContact.Deceased__c, true);

Test.stopTest();

}

@isTest
public static void filterUpdateWithNoRecords() {
List<TDTM_Global_API.TdtmToken> tokens = TDTM_Global_API.getTdtmConfig();
TDTM_Global_API.setTdtmConfig(tokens);

Contact deceasedContact = new Contact(LastName='Deceased', Deceased__c = false);
insert deceasedContact;

//Creating filter condition
Trigger_Handler__c handler = [select Filter_Field__c from Trigger_Handler__c where Class__c = 'ACCT_IndividualAccounts_TDTM'];
handler.Filter_Field__c = 'Deceased__c';
handler.Filter_Value__c = 'true';
update handler;

Test.startTest();

deceasedContact.Deceased__c = true;
update deceasedContact;
Contact theContact = [select Deceased__c from Contact where id = :deceasedContact.Id];
System.assertEquals(theContact.Deceased__c, true);

Test.stopTest();

}
}
33 changes: 32 additions & 1 deletion force-app/main/default/classes/AFFL_MultiRecordTypeMapper.cls
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public virtual with sharing class AFFL_MultiRecordTypeMapper {
********************************************************************************************************/
public Map<String, String> accRecTypeLabelToAPI;

/*******************************************************************************************************
* @description Map of Account Record Type Labels in English to User Language Label
********************************************************************************************************/
private Map<String, String> accRecTypeEnglishToTranslation;

/*******************************************************************************************************
* @description Constructor that initializes class properties.
********************************************************************************************************/
Expand All @@ -99,6 +104,9 @@ public virtual with sharing class AFFL_MultiRecordTypeMapper {
//NOTE: Consider a refactor relative to case sensitivity
this.accRecTypeLabelToAPI = this.getAccRecTypeLabelToAPIMap();

// Map of Account RecordType English label to Translated Label
this.accRecTypeEnglishToTranslation = this.getAccRecTypeEnglishLabelToTranslation();

//Note: Given the supportable number of records for affiliation mappings, having multiple small loops
//is an acceptable and negligible performance hit so we can apply a separation of concerns for future refactoring.

Expand Down Expand Up @@ -163,6 +171,23 @@ public virtual with sharing class AFFL_MultiRecordTypeMapper {
return labelsnames;
}

/**
* @description Returns a map of the English label to the current running user's language
*/
@TestVisible
private Map<String, String> getAccRecTypeEnglishLabelToTranslation() {
Map<String, String> labels = new Map<String, String>();

for (String englishLabel : accRecTypeLabelToAPI.keySet()) {
labels.put(
englishLabel,
accountRecordTypeInfosByDeveloperName.get(accRecTypeLabelToAPI.get(englishLabel)).getName()
);
}

return labels;
}

/**
* @description Gets affiliation mappings that have a populated Account Record Type field and a populated Primary Affiliation Field
* @return The List of affiliation mappings that do not have a blank Account Record Type or a blank Primary Affiliation Field
Expand Down Expand Up @@ -329,8 +354,14 @@ public virtual with sharing class AFFL_MultiRecordTypeMapper {
return false;
}

// we need to use the "english to translation" map since Affiliation_Type__c is a formula field
// and formula fields aren't translated into the running user's language.
if (!accRecTypeEnglishToTranslation.containsKey(affiliation.Affiliation_Type__c)) {
return false;
}

Affl_Mappings__c affiliationMapping = primaryAffiliationMappingsByAccountRecordTypeName.get(
affiliation.Affiliation_Type__c
accRecTypeEnglishToTranslation.get(affiliation.Affiliation_Type__c)
);

if (affiliationMapping?.Auto_Program_Enrollment__c != true) {
Expand Down
5 changes: 5 additions & 0 deletions force-app/main/default/classes/STG_Base_CTRL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public with sharing class STG_Base_CTRL {
return UTIL_CustomSettingsFacade.getAutoCreateSettings();
}

@AuraEnabled
public static String getNamespace() {
return UTIL_Namespace.getNamespace();
}

/*******************************************************************************************************
* @description Saves the Hierarchy Settings passed from the client.
* @param hierarchySettings The Hierarchy_Settings__c record to upsert.
Expand Down
10 changes: 10 additions & 0 deletions force-app/main/default/classes/STG_Base_CTRL_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,14 @@ private class STG_Base_CTRL_TEST {
Id apexJobId = STG_Base_CTRL.executeRefreshAdminAccountBatch();
System.assertNotEquals(null, apexJobId);
}

/*********************************************************************************************************
* @description Tests the namespace retrieval
*/
@isTest
private static void testNamespace() {
String[] parts = String.valueOf(STG_Base_CTRL.class).split('\\.', 2);
String testNamespace = parts.size() == 2 ? parts[0] : '';
Assert.areEqual(testNamespace, STG_Base_CTRL.getNamespace());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import stgHHAccountCustomNameHelp from "@salesforce/label/c.stgHHAccountCustomNa
import automaticHHNaming from "@salesforce/label/c.automaticHHNaming";
import automaticHHNamingHelpText from "@salesforce/label/c.automaticHHNamingHelpText";
import acctNamingOther from "@salesforce/label/c.acctNamingOther";
import stgTellMeMoreLink from "@salesforce/label/c.stgTellMeMoreLink";

const DELAY_INTERVAL = 500; // 0.5 second delay

Expand Down Expand Up @@ -88,14 +87,8 @@ export default class AccountModelSettings extends LightningElement {
hhAutomaticAccountNamingTitle: automaticHHNaming,
hhAutomaticAccountNamingDescription: automaticHHNamingHelpText,
accountNamingComboboxCustomOption: acctNamingOther,
tellMeMoreLink: stgTellMeMoreLink,
};

accNamingHyperLink =
'<a href="https://powerofus.force.com/EDA-Customize-Admin-and-HH-Acct-Names">' +
this.labelReference.tellMeMoreLink +
"</a>";

inputAttributeReference = {
defaultAccountModelComboboxId: "defaultAccountModel",
adminAccountModelComboboxId: "adminAccountModel",
Expand Down Expand Up @@ -375,10 +368,10 @@ export default class AccountModelSettings extends LightningElement {
}

get adminAccDesc() {
return this.labelReference.adminAccountNameFormatDescription + " " + this.accNamingHyperLink;
return this.labelReference.adminAccountNameFormatDescription;
}

get hhAccDesc() {
return this.labelReference.hhAccountNameFormatDescription + " " + this.accNamingHyperLink;
return this.labelReference.hhAccountNameFormatDescription;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ export default class affiliationSettings extends LightningElement {
successToast: stgSuccess,
};

affiliationsHyperLink =
'<a href="https://powerofus.force.com/EDA-Configure-Affiliations-Settings">' +
this.labelReference.tellMeMoreLink +
"</a>";

inputAttributeReference = {
recordTypeValidation: "recordTypeValidation",
affiliationMappings: "affiliationMappings",
Expand Down Expand Up @@ -294,10 +289,6 @@ export default class affiliationSettings extends LightningElement {
}

get affiliationsDesc() {
return (
this.labelReference.primaryAffiliationMappingsTable.primaryAffiliationsDescription +
" " +
this.affiliationsHyperLink
);
return this.labelReference.primaryAffiliationMappingsTable.primaryAffiliationsDescription;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ export default class autoEnrollmentMappingModalBody extends LightningElement {
autoProgramEnrollmentRole: "autoProgramEnrollmentRole",
};

connectedCallback(){
getAccountRecordTypeComboboxVModel({ accountRecordType: this.newAccountRecordType })
.then((result) => {
connectedCallback() {
getAccountRecordTypeComboboxVModel({ accountRecordType: this.newAccountRecordType }).then((result) => {
this.accountRecordTypeComboboxVModel = result;
})
});
}

@wire(getAutoEnrollmentMappingStatusComboboxVModel, {
Expand Down Expand Up @@ -141,10 +140,10 @@ export default class autoEnrollmentMappingModalBody extends LightningElement {
get autoEnrollmentMappingModalDesc() {
switch (this.actionName) {
case "edit":
return this.labelReference.modalBodyEdit + " " + this.autoEnrollmentHyperLink;
return this.labelReference.modalBodyEdit;

case "create":
return this.labelReference.modalBodyCreate + " " + this.autoEnrollmentHyperLink;
return this.labelReference.modalBodyCreate;

case "delete":
return this.labelReference.modalBodyDelete
Expand All @@ -162,14 +161,6 @@ export default class autoEnrollmentMappingModalBody extends LightningElement {
return this.actionName === "delete";
}

get autoEnrollmentHyperLink() {
return (
'<a href="https://powerofus.force.com/EDA-Configure-Affiliations-Settings">' +
this.labelReference.tellMeMoreLink +
"</a>"
);
}

get accountRecordTypeApiNameLabel() {
return this.labelReference.apiNameDisplay.replace("{0}", this.accountRecordTypeComboboxVModel.value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ export default class PrimaryAffiliationsModalBody extends LightningElement {
modalBodyCreate: stgAffiliationsNewModalBody,
};

affiliationsHyperLink =
'<a href="https://powerofus.force.com/EDA-Configure-Affiliations-Settings">' +
this.labelReference.tellMeMoreLink +
"</a>";

inputAttributeReference = {
accountRecordType: "primaryAffiliationsAccountRecordType",
contactField: "primaryAffiliationsContactField",
Expand Down Expand Up @@ -128,10 +123,10 @@ export default class PrimaryAffiliationsModalBody extends LightningElement {
get affiliationsDesc() {
switch (this.affiliationsAction) {
case "edit":
return this.labelReference.modalBodyEditSave + " " + this.affiliationsHyperLink;
return this.labelReference.modalBodyEditSave;

case "create":
return this.labelReference.modalBodyCreate + " " + this.affiliationsHyperLink;
return this.labelReference.modalBodyCreate;
}
}

Expand Down
Loading

0 comments on commit 0dc722e

Please sign in to comment.