Has anyone experienced inconsistencies with dates applied using the OnFieldChangeSetDate write plugin?

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>

Parents Reply
  • Circling back around to this issue...working with support, I was finally able to determine the root cause of the problem. It had nothing to do with the actual plugin configuration or the plugin itself. Instead, it was a misconfiguration in MetadataConfig.xml.  There was an ishfrmfield with ishfielddatatype set to "typedate". If the user opened the properties in Publication Manager, the dialog showed only the date, but not the date time. If the user then changed any metadata or just clicked "Okay" without changing any metadata, pug mgr would write back just the data without the time -- effectively removing the existing date time. (The server would substitute 12:00 a.m. for the now non-existent time.) SOLUTION: Change the ishfielddatatype to "typedatetime" instead of "typedate".

Children
No Data