The state of the registration doesn't change with ECA action Set the Registration State

Created on 11 July 2024, 6 months ago
Updated 15 July 2024, 6 months ago

Problem/Motivation

the state of the registration doesn't change

Steps to reproduce

drupal 10.0.0 with ECA workflow 1.1.6 and registration workflow 3.1.4 and when I create a rule with:
Event: content_entity_view type registration
action: Set the Registration State

the state of the registration doesn't change

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

3.1

Component

Registration Workflow

Created by

πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sazevedo@ua.pt
  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    What state are you attempting to change to? The action requires that you pass the new state in. Please let me know the existing state and the desired new state that is passed to the action.

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman
  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    I've created the states present and certificate.
    In registration workflow I've set: from present to certificate
    I want ECA to change present to certificate

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Are there any messages in the logs? Is this on a test system - are you able to set breakpoints and see if the action is even called?

  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    no messages in reports
    in ECA I've placed another action to send me an email and that action is working

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Is the condition/trigger for the action that sends email the same as this one

  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    yes. I'm sending the ECA export

  • Status changed to Closed: works as designed 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    The "set state" action will not take place unless you setup a valid state transition from "present" to "certificate" in the workflow. This is typically done from this page in Drupal admin:

    /admin/config/workflow/workflows/manage/registration

    After installing your ECA model, once I setup the transition, the new state was saved. Prior to creating the transition, I experienced the same issue you did, which makes sense since the action checks for the transition.

    PS - sorry for the test emails, I forgot to enable email reroute in my test environment

  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    I have the transition set before de ECA, I think you are mentioning what I have in the image attach.
    or do I have to set another?

  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    forgt the image, sorry

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Can you send screenshots of (1) this page: /admin/config/workflow/workflows/manage/registration and (2) the registration being viewed which is supposed to change state. It looks like you have the correct setup but want to double check. Also, does the user viewing the registration have the permissions to change state and edit registrations - try with an admin account and if that works it means it is a permissions issue for the user you were trying before.

  • πŸ‡΅πŸ‡ΉPortugal sazevedo@ua.pt

    Thank you John, that was it a problem of permissions, the user had no permission to edit own registration or change state. I gave those permissions and the ECA is applied!

    thank you so much for your help!
    Susana

Production build 0.71.5 2024