URL link directly to work item
Best Answer
-
Mikhail_Scherbakov Customer Adept IT Monkey ✭✭
Hi,
We solved it this way:
1) Extend base class SR, IR and CR and add text property WI Type.
2) Fill WI Type in all templates for WI creation. In CR template write Incident, etc
3) Create two subscriptions with criteria "When object created". One for target Class "Trouble Ticket User Comment" and one for "Trouble ticket Analyst Comment"
4) Create two separate email templates for each object type. For creation of link you can use this construction:
For Analyst:
<a href="http://ServiceDesk.cpcpipe.ru/<YOUR_PATH_TO_WI_TYPE_PROPERY>/Edit/
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">
[$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$]
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$Important!
You should insert ALL variants of path as on the picture .
This is necessary because the subscription and the template will be used for all WI. For example subscription starts for the incident. Letter Builder will try to get ALL listed extended properties, but since these properties simply does not exist, it will return only that finds, namely the incident. :-)
Please let me know, if you have any questions/
6
Answers
Hi, I don't think its possible. A runbook is one way (my preference for Notifications about comments anyway) or maybe you could build a custom page that takes in a parameter of a WI Id and works out which type based on the prefix and redirects.
So you can use a link of http://portal/view/workitem?id=IR1234
Sorry, no easy solution.
Geoff
I covered how to create a notification that includes a URL based on the Ticket Type in the thread Handling Activities
Side note: My Reviewer Portal is coming along swimmingly
Hi,
We solved it this way:
1) Extend base class SR, IR and CR and add text property WI Type.
2) Fill WI Type in all templates for WI creation. In CR template write Incident, etc
3) Create two subscriptions with criteria "When object created". One for target Class "Trouble Ticket User Comment" and one for "Trouble ticket Analyst Comment"
4) Create two separate email templates for each object type. For creation of link you can use this construction:
For Analyst:
<a href="http://ServiceDesk.cpcpipe.ru/<YOUR_PATH_TO_WI_TYPE_PROPERY>/Edit/
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">
[$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$]
$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItem.TroubleTicketHasAnalystComment' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$$Context/Path[Relationship='CustomSystem_WorkItem_Library!System.WorkItemHasCommentLog' SeedRole='Target' TypeConstraint='CustomSystem_WorkItem_Library!System.WorkItem']/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$
Important!
You should insert ALL variants of path as on the picture .
This is necessary because the subscription and the template will be used for all WI. For example subscription starts for the incident. Letter Builder will try to get ALL listed extended properties, but since these properties simply does not exist, it will return only that finds, namely the incident. :-)
Please let me know, if you have any questions/
You are probably looking for this: Custom single work item edit url for all types
As a side note, you could also try out: SCSM 2012 R2 Reviewer Portal