freescout
freescout copied to clipboard
WorkFlow scenario not working [Ticket overdue, multiple alert]
PHP version: 8.3 FreeScout version: 1.8.120 Database: MySQL Are you using CloudFlare: Just the name server but not using Cloudflare proxy If you need know the version of the Workflow module let me know. I don't know if I can post here. If I should not open an issue about a module, please let me know and sorry in advance, I can explain why I'm opening an issue here. I had read FAQ and also website help section.
I'm investigating this issue to confirm the issue but I'm already pretty sure the issue exist.
I'm unable to set three different workflows to let operator and user to be alerted when an operator reply is not arriving in 12, 24 and 48 hours. For the test purpose timing will be 1 hours, two hours, three hours.
I tested this and worked only for the first workflow so for the first hours. The next two hours and three hours overdue workflow did not work.
Now I'm testing again changing days in hours so 3 workflow for alert the user and the operator if a reply is not made in 1, 2 or 3 hours.
The workflow:
Results screenshot will be posted soon here I suppose in 24 / 48 hours. Test in progress.
I have already tested this but I'm re testing in a clean testing Mail Box and creating report here.
I see that the first workflow that alert by email and add the label > 1 hour overdue worked.
When the Workflow is trigger maybe the waiting time is deserted. I suppose so the first one hours workflow will applied again on the next hours as in this demo test I set the workflow max execution time 3. Let's see if works if I will get another alert email after 1 other hours.
Let's see if after the workflow has been executed the maximum 3 times the other two workflow to alert if the ticket is overdue since 2 and 3 hours will be trigger.
Test in progress. I will update once done. Closing for now.
Issue confirmed. Asap I will post screenshot.
As you can see from the screenshots, only workflow 1 was triggered and max execution time was 3 and was executed just once. I did not get other email notification, just the first trigger alert that alert me about ticket overdue of 1 hours.
Two issue here:
- The workflow to add the label > 1 hour overflow send me just one email. Max execution time was 3 but the workflow has been run just once. Should be not repeated the next hours? This first workflow should be trigged 3 times and in my test was trigged just once.
- Next two workflow in the screenshot was not trigged. I expect also this two workflow must be trigged. Why they did not activate?
In my test seems I can confirm bugs here, with Workflow.
In the above screenshot you can see that the ticket not yet assigned to an operator has trigged the first workflow BUT there is other two ticket assigned to the operator that has not trigged any workflow, even the first. Screenshot below:
In my test you can see I created three test ticket. One created by the operator using the web interface. One by email without an operator reply One by email with the operator reply.
All this three tickets should have workflow applied, the three workflow I created and showed here. This never happen. Just one ticket was triggered and not for the max execution times number that has been set to 3.
Recently my issue about workflow https://github.com/freescout-helpdesk/freescout/issues/3761 has been closed but from my test, also with the latest update, the issue still exist. Workflow are still not working.
I still have this issues and it's very strange. All workflow work except for SLA and ticket closure.
SLA workflow works only for the first SLA after the first time and not for a second alert and label. Ticket are not closed when last customer reply is bypassed.
I have all check green in system/status
This issue still be valid for me, I really hope to find, with your help what can be then all my system will work correctly and all my issues will be solved.
What can help me?
If still no luck you'll need to debug checkConditions() function in /Modules/Workflows/Entities/Workflow.php (line 724) https://github.com/freescout-helpdesk/freescout/wiki/Debugging
Well, what I need to do to debug checkConditions() function?
The linked guide say to use the function
\Log::error('[Debugging] some variable value: '.$some_variable);
How to use that? I need add this exact string in a line on the code of Workflow.php? This line should be pasted as it is or I need customize for checkConditions() ?
If you can provide steps to do I will try this last thing. I want see workflow fully work, is bad that ticket are not auto closed and still be frozen in pending state after the operator reply.
Also it's hard to me understand why SLA work only for the first time and not for the others. This means worflow seems work but only partially.
Would be useful also know what workflow rules you used in your test, is mine rules wrong? I don't think.
For ticket closure I had rule: Close ticket with no reply automatic, max ex time 3 if status is equal to pending and last customer reply is not in the last 1 hours (testing) change status to close
If I remove the line to check last user reply t hen the ticket is closed automatically. It's possible maybe there are also italian translation BUG that are contributing to the ticket closure?
Last user reply is translated in italian like last operator reply. Is this translation wrong? Last user reply is the reply from the user?
If I translate customer from English to Italian customer means not operator. In English workflow when you have rule last reply customer you means operator?
If so seems the Italian translation are wrong. Last customer reply is translated to mean last end user reply. I suppose this should be fixed and translated in Italian as last operator reply, is this correct?
If the actual translation is correct then seems only the check for the last operator reply work. If i check last user reply this seems is not working.
I will need maybe fix this translation, also if I use the Italian language, in the workflow settings, conductions and actions are all showed in the same page, tabs did not work.
This is the English view
This is the Italian view:
Is all showed in one page.
Found maybe why SLA 2 is not working for me
Seems I cannot do the waiting since check in two different workflow because the second one will not work. For have a SLA 2 I need check the label if is overdue1 then check last operator reply, if is not in the desired time then remove overdue1 label, add overdue2 label and send email.
It looks like something does not work well on your server: https://github.com/freescout-helpdesk/freescout/issues/3761#issuecomment-1999546100 It needs to be investigated on your server further.