salesagility / SuiteCRM-Core

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
176 stars 124 forks source link

Workflow Editor: Calculate fields not populating #93

Open erikcarlsonnteligen opened 2 years ago

erikcarlsonnteligen commented 2 years ago

When trying to create a new workflow, when the calculate fields is selected in the actions dropdown the choices do not populate in the panel

Issue

When creating a new workflow, the ability to do a calculated workflow is not present. When logged in as an admin and navigate to the creation of a new workflow. In the actions panel, the select action dropdown has 4 choices. Each choice should populate new fields in the panel to fill out. Create Record, Modify Record, and send email work as expected. Calculate fields does not populate anything.

Calculate fields not working image

Send Email working image

Expected Behavior

Per the user manual, when Calculate fields is selected there should be frields to populate like the picture below.

image

Actual Behavior

The calculate fields do not populate

Steps to Reproduce

  1. log in as administrator
  2. go to admin menu
  3. go to workflow manager
  4. click new workflow
  5. populate a name "test"
  6. Choose workflow module (Opportunities)
  7. Expand Actions Panel
  8. Choose Calculate Fields In Select Action Dropdown
  9. Nothing Happens
  10. Choose another option in select action dropdown
  11. Fields for that dropdown are populated

Context

Can create a custom calculated workflow

Your Environment

pgorod commented 2 years ago

Do you have any messages in your php_errors.log at the time of using that screen?

Can you try it with PHP 7.3 or 7.4 to see if the error is only with PHP 8?

erikcarlsonnteligen commented 2 years ago

Below is the error I found when executing the steps above. I cannot try with a different version of PHP at this time as the system is under heavy use.

[Thu May 12 09:50:56.270729 2022] [proxy_fcgi:error] [pid 1885826] [client 192.168.1.X:64632] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /var/www/suitecrm/public/legacy/modules/AOW_Actions/actions/actionComputeField.php:452\nStack trace:\n#0 /var/www/suitecrm/public/legacy/modules/AOW_WorkFlow/controller.php(558): actionComputeField->edit_display()\n#1 /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php(522): AOW_WorkFlowController->action_getAction()\n#2 /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php(491): SugarController->do_action()\n#3 /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()\n#4 /var/www/suitecrm/public/legacy/include/MVC/Controller/SugarController.php(361): SugarController->process()\n#5 /var/www/suitecrm/public/legacy/include/MVC/SugarApplication.php(101): SugarController->execute()\n#6 /var/www/suitecrm/public/legacy/index.php(52): SugarApplication->execute()\n#7 {main}\n thrown in /va...', referer: https://suitecrm8.hq.com/legacy/index.php?return_module=AOW_WorkFlow&return_action=DetailView&module=AOW_WorkFlow&action=EditView

johnM2401 commented 2 years ago

Hey

I have given this a try in both PHP8 and PHP7.4

The functionality appears to work as expected in PHP7.4: image

However, in PHP8, I do see the same issue as described here

I'll mark this as a bug

Thank you for Raising this!