Skip to content

Conversation

@mcraeteisha
Copy link
Contributor

@mcraeteisha mcraeteisha commented Feb 10, 2026

Feature

Ticket: FOUR-29107

ci:deploy

This PR adds tier-based case retention options to the process edit UI. Which retention periods a user can select is driven by the CASE_RETENTION_TIER environment variable. Options for higher tiers are shown but disabled so users see the full set of options and cannot select those above their tier.

Implementation

Config (config/app.php)

  • case_retention_tier config key reads from CASE_RETENTION_TIER (default '1').
  • Added case_retention_tier_optionsconfig key:
    • Tier 1: six_months, one_year
    • Tier 2: six_months, one_year, three_years
    • Tier 3: six_months, one_year, three_years, five_years

View (resources/views/processes/edit.blade.php)

  • Added tier-based disabling:
    • allowedRetentionPeriods is passed from config based on case_retention_tier. Options not in this list are disabled so higher-tier options are visible but not selectable.
  • Added a confirmation modal:
    - Changing the retention period from the dropdown opens the confirmation modal before applying the new period.

How To Test

  1. Log in to ProcessMaker. Open a Process' Configurations.
  2. Ensure CASE_RETENTION_POLICY_ENABLED=true in your .env file.
  3. Ensure CASE_RETENTION_TIER=1 in your .env file.
    • In the Process Configurations, the six month and one year options should be available to select. The three and five years options should be disabled.
  4. Set CASE_RETENTION_TIER=2 in your .env file.
    • In the Process Configurations, the six month, one year, and three year options should be available to select. The five years option should be disabled.
  5. Select an option that is not the default option.
    - The confirmation modal should display and the buttons should work as expected.

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@sanjacornelius sanjacornelius self-requested a review February 10, 2026 21:57
@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-74a83b006d.engk8s.processmaker.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants