question

ysobhdel avatar image
0 Votes"
ysobhdel asked ·

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:
71900-sample-user.png


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:
1. Enumerating all componenets of projection recursively and searching for relations to System.Domain.User class, removing the default and adding new to current object.
2. 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

msc-service-manager-generalmsc-service-manager-portalmsc-service-manager-authoring
sample-user.png (75.7 KiB)
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Any update on this?
Can any body at least tell me if I can update all templates using C# or Powershell?

0 Votes 0 ·

0 Answers