Workflow notification when one field was changed

It seems like there is a bug in the workflow when i try to create a notification so that when just one field is modified, it will notify the user that’s assigned to that case or task.

For example i create a workflow like this:

Condition - cases - user assigned to - equals - any change

Action - send email - field - user assigned to

This workflow must only send an email when an assigned user was changed. That way the new assigned user will be notified. It does work, however, if you edit any other field in that case, even if you don’t edit the user assigned to field, it still triggers the workflow.

Same thing happens when i create a workflow for any other field. I create it for only one field, but other fields trigger the workflow. I absolutely beed it to work as it’s supposed to. Is it a bug?

I would assume all other people would want itto work properly.

1 Like

I tried this on my 7.10.4 system and it works well - only triggers workflow when the specific “assigned to” field is changed.

My settings are:

Workflow module: Cases
Status: Active
Run: only on save
Run on: modified records

Then the condition is like yours, and for action I used “create task” just to test

By the way, you are aware that any change in record assignment will trigger a system email? This is normal behavior, enabled when you install. So you might be getting a double-email because of that? Or you might not need a Workflow at all :slight_smile:

Thanks for your reply.

And did you try editing any other field and save it? Did it not trigger your workflow?

Well i disabled the built in email notifications to replace them with my own custom notifications.

What I’m trying to achieve is have a notification sent to a user that says A case has been assigned to you. And anytime you change the assigned user it will be sent to the new user. But the problem is, it always gets sent even if I’m only editing a description field or resolution or any other field. And the workflow is setup exactly like you described. Except i also select Repeated runs because if it is not selected, it will only run a notification once for the case, and will not repeat it the other time, when i assign a case to another user.

I’m on 7.10.4 as well. We really need this to work.

Yes I did try editing another field and the Workflow didn’t trigger, as expected.

Why aren’t the default notifications enough for you? Assigning any record in SuiteCRM to a different user triggers an notification email, out-of-the-box.

Yeah but it’s just, all my other notifications are custom, and i want them all look similar, plus i have a logo and some custom design in each notification.

Am i supposed to select Repeated runs? Without this option it won’t trigger for the second time.

You can customize the default assignment emails (simple customizations).

Yes, repeated runs disabled prevents the same workflow from running on the same record more than once, sometimes you really don’t want that.

I’ll try customizing the default notification but the thing is, when i try to create other notifications relateto just one field, they still get triggered by any other field.

Would you be able to try creating a workflow - case description - any change and then send an email notification? Mine still gets triggered by other fields as well.

I’m trying to set it up so an email will be sent that says A case description was updated.

I mean i really need this functionality in the future. We plan to continue using SuiteCRM and are willing to chip in by bringing up the issues and hopefully posting solutions here as well.

But we do need a lot of custom notifications that are very specific to our needs. So far the workflow tool has been working amazing. It’s just this problem that I’ve been experiencing for a long time, won’t let me use the workflow capabilities in full.

Any other ideas?

I didn’t have “repeated runs” turned on. I turned it on and tried a few tests again.

I get the same behaviour as you, editing any field triggers the workflow, ignoring the workflow condition.

Maybe it’s better if you simply open a new Issue on GitHub explaining this bug. Thanks

Oh ok. So the first time it worked for you without selecting repeated runs? Or did you only try once when it worked and haven’t tried the second time to make sure it repeats the notification?

The first I thought it had worked, but probably it hadn’t. I got this:

  • change assigned user —> runs workflow
  • change status —> doesn’t run workflow

So I thought it was because of my workflow condition. But now I see it was simply because of the “repeated runs” being unchecked. The condition seems to be ignored, like you said originally.