File tree Expand file tree Collapse file tree
resources/views/processes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -831,7 +831,10 @@ class="custom-control-input">
831831 this .formData .reassignment_permissions = this .reassignmentPermissions ;
832832 if (this .caseRetentionPolicyEnabled ) {
833833 this .formData .properties = this .formData .properties || {};
834- this .formData .properties .retention_period = this .canSelectRetentionPeriod ? this .canSelectRetentionPeriod .id : null ;
834+ const retentionPeriod = this .canSelectRetentionPeriod
835+ ? this .canSelectRetentionPeriod .id
836+ : this .getDefaultRetentionPeriodId ();
837+ this .formData .properties .retention_period = retentionPeriod;
835838 }
836839
837840 ProcessMaker .apiClient .put (' processes/' + that .formData .id , that .formData )
@@ -863,6 +866,10 @@ class="custom-control-input">
863866 reassignmentClicked () {
864867 this .$refs [" listReassignment" ].add ();
865868 },
869+ getDefaultRetentionPeriodId () {
870+ const allowed = this .allowedRetentionPeriods || [];
871+ return allowed .includes (' one_year' ) ? ' one_year' : (allowed[0 ] || null );
872+ },
866873 onRetentionPeriodSelect (newVal ) {
867874 if (! newVal || ! this .lastConfirmedRetentionPeriod ) {
868875 return ;
You can’t perform that action at this time.
0 commit comments