Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using PublishTransactionState filter in GetSystemWideList does not work

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?

like image 933
Jan H Avatar asked Dec 06 '12 10:12

Jan H


1 Answers

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.

like image 55
Peter Kjaer Avatar answered Oct 18 '22 00:10

Peter Kjaer