3

I'd like to get the date/time of when an item is published. Is this represented in the StateChangeDate attribute of the PublishTransaction XML?

My PublishTransaction item xml is:

<tcm:Item ID="tcm:0-693-66560" Title="page86" Allow="24576" Deny="67108864" Icon="T64L0P0" 
ItemType="64" ItemID="tcm:5-86-64" State="1" StateChangeDate="2015-05-26T11:40:34" 
Publication="002 Web" PublicationTarget="Staging" ItemPath="\002 Web\Root" Action="0" 
ScheduleDate="" UserId="tcm:0-11-65552" User="DEV\Admin" Priority="4" Managed="0" /> 

1 Answer 1

5

The StateChangeDate gets the date/time when the last state change occurred for the transaction. So it will tell you when the transactions current state is achieved. And if the transaction is published successfully (means its in published state (6)), the property will give you the time when the item is published.

3
  • OK, so it is the publish or unpublish time....since those are the 'States' it is referring to, right?
    – robrtc
    Commented May 26, 2015 at 14:49
  • 3
    Well, as in your xml the state is "1" means "waiting for publish". So yes in your case its publish time. Commented May 26, 2015 at 14:53
  • Thanks. I found a full list of the Publish States here, docs.sdl.com/LiveContent/content/en-US/…
    – robrtc
    Commented May 26, 2015 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.