Set futur statut trigger

Hello,


I am trying to create a trigger that change the statut of a single calendar event from live to under construction after this event is outdated ( for example 5 mins after):



So I did :



Event " asset created"

Conditions single calendar event

Action : Iwould like something like under construction 5 minutes after the end of the event.

I think I have to use the attribute of the single event calendar but I am not sure to understand how this thins work.



Could you give me a hand please ?

[quote]I am trying to create a trigger that change the statut of a single calendar event from live to under construction after this event is outdated ( for example 5 mins after):


So I did :



Event " asset created"

Conditions single calendar event

Action : Iwould like something like under construction 5 minutes after the end of the event.

I think I have to use the attribute of the single event calendar but I am not sure to understand how this thins work.[/quote]

A "Set Future Status" Action Type must be added to the end of your trigger to perform the desired operation.

Select this action type and commit the screen to show the options for this action.



Then select the "…after the date and time stored in the attribute" option and the "Single Calendar Event" type and click "Commit" again.

The date attributes for this asset type will then be available in the drop-down list next to the asset type. Select "end_date" and enter the period of five minutes.



Double-check the conditions, ensuring that you are firing the trigger only when necessary, and then enable the trigger when you are ready.

Thanks ,


I tried to do that but when I select "single calendar event " and I press comit. I tried to select a attribute but the list is empty. I don' t know what happen.

The instructions provided were for 3.16.x, specifically sourced from our latest release 3.16.11. I have had a look at our 3.18.4 release to replicate the steps and found that the attribute drop-down list contains no items after selecting "Single Calendar Event" or any other asset type with date fields. This seems to be the scenario described above.



I presume that this system is a 3.18.x system, but please advise if this is not the case. I have lodged a Bug Report for this issue (Bug 3208) which has been replicated in 3.18.4.



Edit: Added bug report ID and link.

Yes you right, my system is a 3.18.2 .
Thanks .

[quote]Yes you right, my system is a 3.18.2 .
Thanks .[/quote]

This bug has been resolved and can be patched on existing 3.18.x systems as this is the only modification since these releases. This is also only possible as the issue is localised to one file and does not require updating other code files or running any "install" scripts.



The revision number, as shown in the header comments, for the affected file core/assets/system/triggers/trigger_action_types/trigger_action_set_future_status/trigger_action_set_future_status.inc should be 1.20 on existing 3.18.x systems.



Please change line 407 in this revision from:

    if ($type == 'datetime') $attr_options[$name] = $name;

to:

    if ($type['type'] == 'datetime') $attr_options[$name] = $name;

Oki thanks :slight_smile: