I tried to apply a filter for the PublishTransactionState when using the GetSystemWideList operation on the Core Service (SDL Tridion 2011 SP1).
If I try set filter values like PublishTransactionState.ScheduledForPublish or PublishTransactionState.WaitingForPublish I get no results, even though I know for sure there are publish transactions with this status in the queue.
var filter = new PublishTransactionsFilterData {ForRepository = new LinkToRepositoryData {IdRef = "tcm:0-69-1"}};
filter.PublicationTarget = new LinkToPublicationTargetData { IdRef = "tcm:0-1-65537" };
filter.PublishTransactionState = PublishTransactionState.ScheduledForPublish;
//filter.StartDate = DateTime.Today.AddDays(-1);
var transactions = coreServiceSession.GetSystemWideList(filter);
Console.WriteLine(transactions.Count() + " publish transactions");
With the filter.PublishTransactionState line enabled, the core service always returns 0 results. With this line commented we will get the list of publish transactions as expected, this includes some transactions with state SceduledForPublish.
Other filters, like the StartDate filter work as expected.
Anyone has this working?
This is a known issue which has been fixed in 2013.
There is no hotfix available right now, but you can work around it by requesting the list without setting the PublishTransactionState property and then post-processing the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With