From d7225c0056a1e794cfa1b64595dd9ceb392ebbbc Mon Sep 17 00:00:00 2001
From: sanja <52755494+sanjacornelius@users.noreply.github.com>
Date: Tue, 17 Feb 2026 17:23:47 -0800
Subject: [PATCH 1/3] store retention_updated_by property
---
resources/views/processes/edit.blade.php | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/resources/views/processes/edit.blade.php b/resources/views/processes/edit.blade.php
index 531db91a92..65e7029481 100644
--- a/resources/views/processes/edit.blade.php
+++ b/resources/views/processes/edit.blade.php
@@ -688,6 +688,7 @@ class="custom-control-input">
pendingRetentionPeriod: null,
caseRetentionPolicyEnabled: @json(config('app.case_retention_policy_enabled')),
lastConfirmedRetentionPeriod: null,
+ originalRetentionPeriodId: null,
}
},
mounted() {
@@ -723,6 +724,7 @@ class="custom-control-input">
}
this.lastConfirmedRetentionPeriod = this.canSelectRetentionPeriod;
+ this.originalRetentionPeriodId = this.canSelectRetentionPeriod ? this.canSelectRetentionPeriod.id : null;
},
computed: {
retentionPeriodSelectOptions() {
@@ -835,6 +837,17 @@ class="custom-control-input">
? this.canSelectRetentionPeriod.id
: this.getDefaultRetentionPeriodId();
this.formData.properties.retention_period = retentionPeriod;
+ // Log retention period update only if the retention period is changed from the original value
+ if (this.formData.properties.retention_period !== this.originalRetentionPeriodId) {
+ // The logged in user is the one who updated the retention period
+ const userID = document.head.querySelector("meta[name=\"user-id\"]");
+ const userFullName = document.head.querySelector("meta[name=\"user-full-name\"]");
+ this.formData.properties.retention_updated_by = {
+ id: userID.content,
+ fullname: userFullName.content,
+ };
+ this.formData.properties.retention_updated_at = new Date().toISOString();
+ }
}
ProcessMaker.apiClient.put('processes/' + that.formData.id, that.formData)
From b3397b7188495ca38e7d04d38ef4319b1729c282 Mon Sep 17 00:00:00 2001
From: sanja <52755494+sanjacornelius@users.noreply.github.com>
Date: Wed, 18 Feb 2026 16:23:43 -0800
Subject: [PATCH 2/3] Display updated_by details
---
resources/views/processes/edit.blade.php | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/resources/views/processes/edit.blade.php b/resources/views/processes/edit.blade.php
index 65e7029481..1017517064 100644
--- a/resources/views/processes/edit.blade.php
+++ b/resources/views/processes/edit.blade.php
@@ -405,7 +405,9 @@ class="collapse show"
- {{ __('The default retention period is in effect.')}}
+ {{ __('The default retention period is in effect.')}}
+
+ {{ __('Last modified by: ') }}@{{ retentionUpdatedBy.fullname.trim() }}{{ __(', at') }} @{{ retentionUpdatedBy.date | formatDate('datetime') }}
caseRetentionPolicyEnabled: @json(config('app.case_retention_policy_enabled')),
lastConfirmedRetentionPeriod: null,
originalRetentionPeriodId: null,
+ retentionUpdatedBy: {
+ id: null,
+ fullname: null,
+ date: null,
+ },
}
},
mounted() {
@@ -725,6 +732,11 @@ class="custom-control-input">
this.lastConfirmedRetentionPeriod = this.canSelectRetentionPeriod;
this.originalRetentionPeriodId = this.canSelectRetentionPeriod ? this.canSelectRetentionPeriod.id : null;
+ this.retentionUpdatedBy = {
+ id: _.get(this.formData, 'properties.retention_updated_by.id'),
+ fullname: _.get(this.formData, 'properties.retention_updated_by.fullname'),
+ date: _.get(this.formData, 'properties.retention_updated_at'),
+ };
},
computed: {
retentionPeriodSelectOptions() {
@@ -846,7 +858,13 @@ class="custom-control-input">
id: userID.content,
fullname: userFullName.content,
};
- this.formData.properties.retention_updated_at = new Date().toISOString();
+ const updatedAt = new Date().toISOString();
+ this.formData.properties.retention_updated_at = updatedAt;
+ this.retentionUpdatedBy = {
+ id: parseInt(userID?.content ?? 0),
+ fullname: userFullName?.content ?? '',
+ date: updatedAt,
+ };
}
}
@@ -1108,7 +1126,6 @@ class="custom-control-input">
}
.default-retention {
- font-style: italic;
background-color: #F1F2F4;
border-radius: 8px;
}
From db48c0335a98b7d312264342609866144fb8b844 Mon Sep 17 00:00:00 2001
From: sanja <52755494+sanjacornelius@users.noreply.github.com>
Date: Thu, 19 Feb 2026 16:21:35 -0800
Subject: [PATCH 3/3] Format the last modified date to the users datetime
settings
---
resources/views/processes/edit.blade.php | 35 +++++++++++++++++-------
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/resources/views/processes/edit.blade.php b/resources/views/processes/edit.blade.php
index 1017517064..efe5ffb8ec 100644
--- a/resources/views/processes/edit.blade.php
+++ b/resources/views/processes/edit.blade.php
@@ -407,7 +407,7 @@ class="collapse show"
{{ __('The default retention period is in effect.')}}
- {{ __('Last modified by: ') }}@{{ retentionUpdatedBy.fullname.trim() }}{{ __(', at') }} @{{ retentionUpdatedBy.date | formatDate('datetime') }}
+ {{ __('Last modified by: ') }}@{{ retentionUpdatedBy.fullname.trim() }}{{ __(', at') }} @{{formatDateUser(retentionUpdatedBy.date) }}
return allowed.includes('one_year') ? 'one_year' : (allowed[0] || null);
},
onRetentionPeriodSelect(newVal) {
- if (!newVal || !this.lastConfirmedRetentionPeriod) {
+ if (!newVal || !this.lastConfirmedRetentionPeriod) {
return;
}
@@ -915,15 +915,15 @@ class="custom-control-input">
this.showRetentionConfirmModal = true;
},
confirmRetentionChange() {
- if (this.pendingRetentionPeriod) {
- this.canSelectRetentionPeriod = this.pendingRetentionPeriod;
- this.lastConfirmedRetentionPeriod = this.pendingRetentionPeriod;
+ if (this.pendingRetentionPeriod) {
+ this.canSelectRetentionPeriod = this.pendingRetentionPeriod;
+ this.lastConfirmedRetentionPeriod = this.pendingRetentionPeriod;
- this.formData.properties = this.formData.properties || {};
- this.formData.properties.retention_period = this.pendingRetentionPeriod.id;
- }
+ this.formData.properties = this.formData.properties || {};
+ this.formData.properties.retention_period = this.pendingRetentionPeriod.id;
+ }
- this.retentionModalStep = 'success';
+ this.retentionModalStep = 'success';
},
cancelRetentionChange() {
this.canSelectRetentionPeriod = this.lastConfirmedRetentionPeriod;
@@ -939,11 +939,26 @@ class="custom-control-input">
if (this.retentionModalStep === 'confirm') {
this.cancelRetentionChange();
}
+ },
+ formatDateUser(value) {
+ let config = "";
+ if (typeof ProcessMaker !== "undefined" && ProcessMaker.user && ProcessMaker.user.datetime_format) {
+ config = ProcessMaker.user.datetime_format;
+ }
+
+ if (value) {
+ if (moment(value).isValid()) {
+ return window.moment(value)
+ .format(config);
+ }
+ return value;
+ }
+ return "n/a";
}
},
+
});
});
-
@endsection