Incident Template with Status closed
Target: When they click on "New -> Work Item -> Incident -> From Template -> IR: closed", then the Incident form should open, the should be able to fill out description etc... and then on "Create". The Indicent should afterwards have the status closed.
I've already tried to create a new template, export ManagementPack, changed the ObjectTemplate:
<ObjectTemplate ID="ObjectTemplate.8cb93bd47f624ee79172d099d0f92c9c" TypeID="IncidentManagement!System.WorkItem.Incident.ProjectionType">
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Escalated$">False</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Source$">$MPElement[Name='CustomSystem_WorkItem_Incident_Library!IncidentSourceEnum.Portal']$</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Status$">$MPElement[Name='CustomSystem_WorkItem_Incident_Library!IncidentStatusEnum.Closed']$</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/NeedsKnowledgeArticle$">False</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/TierQueue$">a153a330-e2f8-0f44-963f-e7d4b3cfbbc0</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/HasCreatedKnowledgeArticle$">False</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Classification$">245ad2a4-c472-e323-b876-1d060924e3cb</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicket']/Impact$">$MPElement[Name='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicket.ImpactEnum.Medium']$</Property>
<Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicket']/Urgency$">$MPElement[Name='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicket.UrgencyEnum.Medium']$</Property>
</ObjectTemplate>
But i'm not able to import the MP back again...
Any ideas?
Regards,
Raffael
Answers
I'm not sure, but you probably need to include relationships for ClosedbyUser and ResolvedByUser (as Closed status can only be set on a Resolved ticket).
But when creating the template, you can just set the status to closed right away (instead of in the MP afterwards), by using the "Change Incident Status" task, select Other and select Closed. Fill out any other fields you need and save that template. I just tried it, and it gave me the following MP (cleared for personal info):
Screens:
1) Template
2) Template
3 - 9) Create IR from Template and fill out and save (with MY User/Analyst)
10 - 15) Create IR from Template and fill out and save (with OTHER User/Analyst)
Also the "time/date" is from the Template (14:50)...
But if you do use the field, the only way I can think of fixing this is with a PS script or Orchestrator, where you could catch newly created IRs with status Closed (or on a custom class just for this, if you have it) and set the user from CreatedBy to be ResolvedBy.