Unnecessary update of user information when creating a work item base on a projection template
When a new template is saved, say an incident template, and an assigned to user is selected, nearly all modified properties of that user is saved in the management pack. Here is an example:
As you can see my business phone number is saved as 1234, now if I change my phone number in Active directory and CMDB as well, after each usage of this template, my phone number is set back to 1234. Here is the problematic code:
ManagementPackObjectTemplate objectTemplate = GetTemplate(TemplateName);
EnterpriseManagementObjectProjection projection = new EnterpriseManagementObjectProjection(emgObject, objectTemplate);
//some property initialization here
projection.Overwrite();
There are two solutions which I have implemented:
- Enumerating all componenets of projection recursively and searching for relations to System.Domain.User class, removing the default and adding new to current object.
- Constantly updating management pack templates and removing additional data of users
Any solution to this problem?
P.S. I don't know of any performance side effect regarding update of users when they have so many tickets related to them and it really concerns me performance wise.
P.S I have tested Service Manager Portal and it has the same issue when creating new workitem
P.S. I have tested the Cireson Portal and it does not have this issue when creating new Incident