Detecting language please wait for.......
I am using the OnFieldChangeSetDate write plugin to set dates when topics are moved to various states. The write plugin behaves as expected when the topic is first moved to the configured state. However, when any metadata is subsequently changed, the previously set date reverts to today's date at 12:00 a.m. Even if I change the topic type (or some other random bit of metadata) rather than the workflow status, the OnFieldChangeSetDate plugin fires.
Here is an example of one of my configurations:
<plugin name="SETREVIEWENDDATE" handler="OnFieldChangeSetDate" ishcondition="ISHType in ('ISHModule', 'ISHLibrary') and ISHLevel='lng' and CurrentAction='SetMetadata'"> <description>Set the review end date when objects are transitioned to Edited Draft status.</description> <workingset> <ishfields> <ishfield name="FSTATUS" level="lng" /> <ishfield name="FREVIEWENDDATE" level="lng" /> </ishfields> </workingset> <initialize> <parameters> <parameter name="ConditionMetadataField">FSTATUS</parameter> <parameter name="ConditionMetadataFieldLevel">lng</parameter> <parameter name="ConditionMetadataFieldValueType">element</parameter> <parameter name="ConditionMetadataFieldToValue">VSTATUSEDITEDDRAFT</parameter> <parameter name="SetMetadataField">FREVIEWENDDATE</parameter> <parameter name="SetMetadataFieldLevel">lng</parameter> <parameter name="SetMetadataFieldOverwriteExisting">Yes</parameter> </parameters> </initialize> </plugin>
Your sample looks almost identical to the documented sample on https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Docs-v2.1.1/GUID-C8407155-6A53-4C2C-AD53-9F9C06350058 which usually is the tested one.
Especially the "or some other random bit of metadata" of your explanation makes me wonder if you have other plugins configured around FREVIEWENDDATE.
You potentially analyze more by also configuring the "ConditionMetadataFieldFromValue" so that you explicitly test the status transition.
Don't know how much you can share here in public... if this needs to go over support, then please share your full plugin configuration, the matching logging of an execution and the plugin code.
Thanks, Dave. My client submitted a support case. My apologies. I probably should have gone that route first for this issue. I'll report back here any relevant info when it is resolved. May still be helpful for folks going forward to have the information here.