- Issue created by @kubokura
- Status changed to Postponed: needs info
over 1 year ago 5:53am 26 March 2023 - 🇯🇴Jordan Anas_maw
Please try the latest dev version of 3.0.x branch, and confirm if it's working
Thank you for your reply. The problem is also reproduced with 3.0.x-dev.
And sorry for less information.
On /admin/config/workflow/workflow/WORKFLOW_ID/notifications/LABEL/edit screen,
when I set "From state" to "Any state", the problem is reproduced,
when I set "From state" to specific state like "In Draft", the problem is not reproduced.- 🇯🇴Jordan Anas_maw
Did you run drush updb after updating to the latest version?
Yes, I ran drush updb.
composer require 'drupal/workflow_notifications:^3.0@beta'
drush updb
drush crBy the way, the problem is reproduced with 3.0.0-beta3 (the latest beta).
- 🇯🇴Jordan Anas_maw
Please note that email notification any draft will not work when the entity is created, it will work on update only, is it your case?
because I did a test from my side and it's working fine It seems you need to start from 8.x-1.0-alpha3 to reproduce. Is this an update issue from 8.x-1.0 to 3.0.0?
Here is a repro step.
(Conditions: Drupal 9.5.5 + workflow 1.6.0 + workflow_notifications 8.x-1.0-alpha3 then 3.0.0-beta3)[With 8.x-1.0-alpha3]
1. With administrator account
Go to https:///admin/config/workflow/workflow .
Click Add workflow and create the following;
Label=example_workflow
Click Save.Go to https:///admin/config/workflow/workflow/example_workflow/states .
Click Add State and create the following three;
state1
stete2
state3
Click Save.Go to https:///admin/config/workflow/workflow/example_workflow/transition_roles .
Check Author and Authenticated user checkbox for the following four;
From Creation To state1, state2, state3
From state1 To state2, state3
From state2 To state1, state3
From state3 To state1, state2
Click Save configuration.Go to https:///admin/config/workflow/workflow/example_workflow/notifications .
Click Add Notification (Add Mail Notification) and create the following three;
Label=action1, From state=Any State, To state=state1, Subject=[action1], Message=action1
Label=action2, From state=Any State, To state=state2, Subject=[action2], Message=action2
Label=action3, From state=Any State, To state=state3, Subject=[action3], Message=action3Note.Settings of When to trigger=On State change, Email addresses=[current-user:mail] and Text format=Basic HTML are the same for all.
Go to https:///admin/structure/types .
Click Add content type and create the following;
Name=example_content
Click Save and manage fields.Automatically go to https:///admin/structure/types/manage/example_content/fields .
Click Add field and create the following;
Add a new field=Workflow state, Label=example_status
Click Save and continue.Automatically go to https:///admin/structure/types/manage/example_content/fields/node.example_content.field_example_status/storage .
Set Workflow type to example_workflow.
Click Save field settings.Automatically go to https:///admin/structure/types/manage/example_content/fields/node.example_content.field_example_status .
Set Field visibility and permissions to Custom permissions.
Check Authenticated user checkbox in all rows.
Click Save settings.Go to https:///admin/structure/types/manage/example_content/permissions .
Check Authenticatid user checkbox in all rows.
Click Save permissions.Go to https:///admin/content .
Click Add content, click example_content, enter "test" in the Title field.
Save
Copy the URL of the node (e.g. https:///node/nnnn).2. With your account
Go to https:///node/nnnn/workflow .
Check state2 and Click Update workflow. (from state1 to state2)
The problem is NOT reproduced.[With 3.0.0-beta3]
On the linux OS console screen, update to 3.0.0-beta3.
composer require 'drupal/workflow_notifications:^3.0@beta'
drush updb
drush cr3. With your account
Go to https:///node/nnnn/workflow .
Check state3 and Click Update workflow. (from state2 to state3)
The problem is reproduced.Check state1 and Click Update workflow. (from state3 to state1)
The problem is reproduced.Check state2 and Click Update workflow. (from state1 to state2)
The problem is reproduced.In addition to the reproduce steps above, I have added action4, action5, action6 with 3.0.0-beta3. Then the problem is not reproduced.
It seems 'Any State' selected at 8.x-1.0-alpha3 becomes invalid at 3.0.0-beta3. (See add_action4~6.PNG, the term 'any' of action1,2,3 and the term 'Any State' of action4,5,6.)Here are additional steps.
[With 3.0.0-beta3]
Go to https://your website/en/admin/config/workflow/workflow/example_workflow/notifications .
Click Add Notification button and create the following three;
Label=action4, From state=Any State, To state=state1, Subject=[action4], Message=action4
Label=action5, From state=Any State, To state=state2, Subject=[action5], Message=action5
Label=action6, From state=Any State, To state=state3, Subject=[action6], Message=action6- 🇯🇴Jordan Anas_maw
You are not running drush updb after updating to 3.0.0-beta3, please run drush updb
- Status changed to Closed: works as designed
over 1 year ago 8:07am 3 April 2023