# Campaign: Decisions "within" time doubled if days are selected

**URL:** <https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [June 15, 2023, 7:01pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335 "2023-06-15T19:01:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [June 15, 2023, 7:01pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/1 "2023-06-15T19:01:50Z")

</div>

**Your software**  
My Mautic version is: 4.4.8  
My PHP version is: 7.4.29  
My Database type and version is: 10.3.38-MariaDB-0ubuntu0.20.04.1

**Your problem**  
The issue is: The actions on the negative branch of 2 and 3 are done after double of the time mentioned for the “within” decision. Details:

- Mautic will wait 2 days first for the Decision to become true
- if Decision is false, Mautic is scheduling the action after another 2 extra days
- and then the email will be sent (action will be triggered)
- if 3 days were set as “within”, then Mautic would wait 3 days for Decision + extra 3 days, then action would be triggered.

🙂 According to this campaign (named TEST-Timing):

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/645bdf03099c37dc1530455045a4684d997a8a44.png)

🔍 Below you see the history for a contact that entered the campaign on 12 June:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f1da9226884349e916f7a870697dd424898de5ae.png)

✅ The branch 1 was OK. The waiting for 48h worked as expected. It is set like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/dc25da264e6f6855b8f8c4bf9b3de1303835c31a.png)

And the email action right after:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/9376f4e7f68546a855eb587eac8d5a17add57fb2.png)

❌ For branch 2 was not ok. It is set like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/dd997debe71791b951756bb6999b01be6ce13bbe.png)

❌ For branch 3 was also not ok. It is set like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8d454ceb6d29aeea63851d8b766bb71cb976b4e2.png)

**These errors are showing in the log:**  
Today’s Mautic error log is empty. Check server error log for error messages Mautic didn’t have a chance to catch.

**Steps I have tried to fix the problem:**  
Documented above. I do not know where to look inside the code. Until it is fixed, I will use type 1.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 18, 2023, 8:57pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/2 "2023-06-18T20:57:25Z")

</div>

I didn’t find the problem. Your path 2 and 3 waits up to 48h for the decision to become yes, or go the negative path. There you sent the mail to be send 2 days later. That makes 4 days…

2 days for decision → decision made → 2 days until send.

Or did I not understand correctly?

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [June 20, 2023, 5:40am UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/3 "2023-06-20T05:40:22Z")

</div>

> [@dirk\_s](#):
>
> Your path 2 and 3 waits up to 48h for the decision to become yes

The path 2 and 3:

- waits 2 days
- for the time frame between 8:00 and 9:00

Only the path 1 waits 48h and this behaves normally.

Here I find the BUG: the behavior is different when choosing 2 days or 48h.

> [@dirk\_s](#):
>
> 2 days for decision → decision made → 2 days until send.

Almost so, better:

> 2 days for decision → decision not made → 2 days until send.

Here I find the problem, I would expect:

> 2 days for decision → decision not made → send immediately.

**Real use case:**

> 2 days for clicking the email =\> email not clicked =\> send reminder immediately

Sending the reminder after 4 days in total, is way too much. Not to mention if we set to 3 days the “within” time.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 20, 2023, 6:03am UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/4 "2023-06-20T06:03:31Z")

</div>

Sorry, it was a misunderstanding on my side. If it can be recreated it clearly is a bug. I suggest you open a ticket in github. I will give it a try later - maybe someone else can try to recreate earlier.

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/m.hashemian/32/6382_2.png) [@m.hashemian](https://forum.mautic.org/u/m.hashemian)\
**Post date:** [August 11, 2023, 4:29pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/5 "2023-08-11T16:29:38Z")

</div>

Hey @IonutOjicaDe

Did you end up creating the bug for it? I am facing the exact same problem. I ran a campaign last year and it worked as expected (I was running 4.3.1 back then). But this year, when I updated my Mautic to 4.4.9, all days are doubled. I reported it [here](https://forum.mautic.org/t/campaign-event-scheduling-in-mautic-4-4-9).

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [August 12, 2023, 9:20am UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/6 "2023-08-12T09:20:08Z")

</div>

No, I did nothing about it, only mentioned here.  
I solved it by changing the “within 2 days + between 8:00 and 9:00” by 2 steps:

1. Modify Tag (with no tag inside) and “within 48 hours”
2. Afterwards the real action (send email) with “after 0 days + between 8:00 and 9:00”

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/38789a20c8cdebe3df0470d3fd5179780a46630e.png)

This is a workaround and not the real solution.  
The solution would be to solve the bug.

Actually, you could revert the update. Or do you need some new features from 4.4.9 version?

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/m.hashemian/32/6382_2.png) [@m.hashemian](https://forum.mautic.org/u/m.hashemian)\
**Post date:** [August 14, 2023, 10:33am UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/7 "2023-08-14T10:33:18Z")

</div>

Thanks. Likely will use your workaround.

Re. reverting the updating, I’m afraid that’ll end up corrupting the data (not with Mautic, but with other softwares I’ve not had a good experience in update reverting).

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [August 31, 2023, 10:13am UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/8 "2023-08-31T10:13:59Z")

</div>

@IonutOjicaDe would you mind creating an issue for that? looks like its confirmed now by @m.hashemian experiencing the same. I will then check this bug and categorize it.

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [August 31, 2023, 4:23pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/9 "2023-08-31T16:23:55Z")

</div>

> <https://github.com/mautic/mautic/issues/12686>
>
> \### Mautic Version
> 
> 4.4.x series
> 
> \### PHP version
> 
> 7.4.29
> 
> \### What browsers are… you seeing the problem on?
> 
> Not relevant
> 
> \### What happened?
> 
> The actions on the negative branch of 2 and 3 are done after double of the time mentioned for the “within” decision.
> 
> Details: This will double the waiting time:
> !\[image\](https://github.com/mautic/mautic/assets/96743055/a2ec6796-d415-461d-8272-168fc6306dbf)
> 
> This will work as expected:
> !\[image\](https://github.com/mautic/mautic/assets/96743055/8852a5d7-1701-4136-9a23-f0689d4ce89a)
> 
> \[Go to Forum Topic by clicking here.\](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/1)
> 
> \### How can we reproduce this issue?
> 
> Step 1: Create this campaign:
> 
> !\[image\](https://github.com/mautic/mautic/assets/96743055/8d20f2a2-af97-45a3-ba01-64583f08847e)
> 
> Branch 1 (within 48 hours): work as expected.
> Branch 2 and 3 (within 2 days): delay time is doubled.
> 
> It will show like this in the Contact history:
> !\[image\](https://github.com/mautic/mautic/assets/96743055/0c020dda-d6ca-4f71-aead-b9dc82a81679)
> 
> 
> \### Relevant log output
> 
> \`\`\`shell
> No log output available.
> \`\`\`
> 
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [October 25, 2023, 8:36pm UTC](https://forum.mautic.org/t/campaign-decisions-within-time-doubled-if-days-are-selected/28335/10 "2023-10-25T20:36:52Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
