PMimport task (subsequent sub-task) does not disable superseded updates.
Error:
------------
9/28/2021 2:19:54 PM (AtrsHost) Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.ExecuteTask
Patch Management Import Resources task exception
An item with the same key has already been added.
[System.ArgumentException @ mscorlib]
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.GetParentPoliciesForSupersededUpdates(DateTime limitDate)
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.GetItemsForCleanup()
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.CleanupSupersededAdvertisements()
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.DisableSupersededSoftwareUpdateTasksTask()
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.ExecuteTask()
Exception logged from:
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.ExecuteTask()
at Altiris.PatchManagementCore.Tasks.Server.DisableSupersededUpdateTask.OnExecuteSingleton(Altiris.TaskManagement.ServerTasks.IServerTaskExecutionInstance)
at Altiris.PatchManagementCore.Tasks.Server.SerializingBaseSingletonServerTask<TContent,TControl>.OnExecute(Altiris.TaskManagement.ServerTasks.IServerTaskExecutionInstance)
at Altiris.TaskManagement.SingletonTask.SingletonTaskContext.Execute(Altiris.TaskManagement.IBaseTask, System.Func<Altiris.TaskManagement.ServerTasks.IServerTaskExecutionInstance,Altiris.TaskManagement.Common.Execution.ExecutionResult>, Altiris.TaskManagement.ServerTasks.IServerTaskExecutionInstance)
----------
ITMS 8.5 RU4
Defect
Attached there are two stored procedures with fix. See the attached files:
spPMCore_GetAllSupersededAdvertisements.sql
spPMCore_GetSupersedanceHierarchy.sql
Run them against the SMP database (NOTE: use of database name in first line of each procedure, change if necessary)