Set Admin User as Default run_as_user_id When Importing Scripts by sanjacornelius · Pull Request #6208 · ProcessMaker/processmaker
Issue & Reproduction Steps
This PR addresses an issue discovered during the import of scripts from Guided Templates where scripts lacking a run_as_user_id caused a A user is required to run scripts. error when running the Re-run Wizard process. To resolve this, the PR implements setting the admin user as the default run_as_user_id when importing such scripts.
How to Test
- Ensure your environment has the latest Guided Templates synced
php artisan processmaker:sync-guided-templates. - Create a process from the Guided Template.
- Navigate to that process's Launchpad.
- Select "Re-run Wizard."
- Complete the wizard.
- Navigate to "Requests -> All Requests."
- Select the recently completed request (the status may initially show as "cancelled").
- View the summary data.
- Ensure no errors such as
_configuration_error_node_212are present.
Example Error that was previously returned:
Related Tickets & Packages
ci:next
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.
