Skip to content

Commit

Permalink
Bugfix: incorrect visibility rules for the tab "Related Record Detail…
Browse files Browse the repository at this point in the history
…s" on LogEntryRecordPage (#741)

* Small bugfix related to component visibility rules added in release v4.14.0, which prevented the tab "Related Record Details" from showing on LogEntryRecordPage.flexipage-meta.xml

* Also fixed some flaky tests in LogBatchPurgeController_Tests that caused (inconsistent) pipeline errors due to (sometimes) duplicate external ID values (occasionally)
  • Loading branch information
jongpie authored Aug 22, 2024
1 parent 17c6b7a commit 70cecec
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 510 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

## Unlocked Package - v4.14.2
## Unlocked Package - v4.14.3

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oQZQAY)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oQZQAY)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oQjQAI)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oQjQAI)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oQZQAY`
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oQjQAI`

`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oQZQAY`
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oQjQAI`

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@
<componentName>flexipage:fieldSection</componentName>
<identifier>flexipage_fieldSection8</identifier>
<visibilityRule>
<booleanFilter>1 AND 2</booleanFilter>
<booleanFilter>1 OR 2</booleanFilter>
<criteria>
<leftValue>{!Record.HasRecordId__c}</leftValue>
<operator>EQUAL</operator>
Expand Down
2 changes: 1 addition & 1 deletion nebula-logger/core/main/logger-engine/classes/Logger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
global with sharing class Logger {
// There's no reliable way to get the version number dynamically in Apex
@TestVisible
private static final String CURRENT_VERSION_NUMBER = 'v4.14.2';
private static final String CURRENT_VERSION_NUMBER = 'v4.14.3';
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
private static final List<LogEntryEventBuilder> LOG_ENTRIES_BUFFER = new List<LogEntryEventBuilder>();
private static final String MISSING_SCENARIO_ERROR_MESSAGE = 'No logger scenario specified. A scenario is required for logging in this org.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import FORM_FACTOR from '@salesforce/client/formFactor';
import { LoggerStackTrace } from './loggerStackTrace';

const CURRENT_VERSION_NUMBER = 'v4.14.2';
const CURRENT_VERSION_NUMBER = 'v4.14.3';

const LOGGING_LEVEL_EMOJIS = {
ERROR: '⛔',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ private class LogBatchPurgeController_Tests {
private static void it_should_return_summary_for_logEntryTag_created_today() {
Integer expectedRecordCountWithPurgeActionDelete = 5;
Integer expectedRecordCountWithPurgeActionCustom = 4;
createLogEntryTagRecords('TXN1', 'Delete', expectedRecordCountWithPurgeActionDelete, System.now());
createLogEntryTagRecords('TXN2', 'Custom', expectedRecordCountWithPurgeActionCustom, System.now());
createLogEntryTagRecords('Delete', expectedRecordCountWithPurgeActionDelete, System.now());
createLogEntryTagRecords('Custom', expectedRecordCountWithPurgeActionCustom, System.now());

List<AggregateResult> logObjectResult = LogBatchPurgeController.getLogEntryTagObjectSummary('TODAY');

Expand All @@ -186,8 +186,8 @@ private class LogBatchPurgeController_Tests {
Integer expectedRecordCountWithPurgeActionDelete = 5;
Integer expectedRecordCountWithPurgeActionCustom = 4;
Datetime createDate = DateTime.newInstance(Date.today().toStartOfWeek(), Datetime.now().time());
createLogEntryTagRecords('TXN1', 'Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('TXN2', 'Custom', expectedRecordCountWithPurgeActionCustom, createDate);
createLogEntryTagRecords('Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('Custom', expectedRecordCountWithPurgeActionCustom, createDate);

List<AggregateResult> logObjectResult = LogBatchPurgeController.getLogEntryTagObjectSummary('THIS_WEEK');

Expand All @@ -208,8 +208,8 @@ private class LogBatchPurgeController_Tests {
Integer expectedRecordCountWithPurgeActionDelete = 5;
Integer expectedRecordCountWithPurgeActionCustom = 4;
Datetime createDate = DateTime.newInstance(Date.today().toStartOfMonth(), Datetime.now().time());
createLogEntryTagRecords('TXN1', 'Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('TXN2', 'Custom', expectedRecordCountWithPurgeActionCustom, createDate);
createLogEntryTagRecords('Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('Custom', expectedRecordCountWithPurgeActionCustom, createDate);

List<AggregateResult> logObjectResult = LogBatchPurgeController.getLogEntryTagObjectSummary('THIS_MONTH');

Expand All @@ -230,8 +230,8 @@ private class LogBatchPurgeController_Tests {
Integer expectedRecordCountWithPurgeActionDelete = 5;
Integer expectedRecordCountWithPurgeActionCustom = 4;
Datetime createDate = Datetime.now();
createLogEntryTagRecords('TXN1', 'Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('TXN2', 'Custom', expectedRecordCountWithPurgeActionCustom, createDate);
createLogEntryTagRecords('Delete', expectedRecordCountWithPurgeActionDelete, createDate);
createLogEntryTagRecords('Custom', expectedRecordCountWithPurgeActionCustom, createDate);

Map<String, Object> metricsResult = LogBatchPurgeController.getMetrics('TODAY');

Expand Down Expand Up @@ -360,8 +360,8 @@ private class LogBatchPurgeController_Tests {
}
}

private static void createLogEntryTagRecords(String transactionIdPrefix, String purgeAction, Integer noOfRecords, Datetime createDate) {
Log__c log = new log__c(TransactionId__c = transactionIdPrefix);
private static void createLogEntryTagRecords(String purgeAction, Integer noOfRecords, Datetime createDate) {
Log__c log = new log__c(TransactionId__c = System.UUID.randomUUID().toString());
log.LogPurgeAction__c = purgeAction;
log.LogRetentionDate__c = System.today();
insert log;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nebula-logger",
"version": "4.14.2",
"version": "4.14.3",
"description": "The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.",
"author": "Jonathan Gillespie",
"license": "MIT",
Expand Down
Loading

0 comments on commit 70cecec

Please sign in to comment.