Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.
DISCLAIMER
All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.
Cireson does not and will not support or maintain these enhancements, extensions, and scripts.
For Team Cireson uploads click here.
Custom single work item edit url for all types
Using Cireson (undocumented) API we can actually get around this problem with a small custom solution. Point the user to the custom url http(s)://portal/CustomSpace/EditWorkItem.html?id=WORKITEMID which will fetch the correct url and redirect the user.
Tested with IE11, Chrome 55, Firefox 45 & Edge with windows authentication.
I've attached the files needed in a zip archive. To install just drop the files in CustomSpace and start using your new custom url.
Comments
Ex. https://support.cireson.com/customspace/editworkitem.html?id=IR41207
So perhaps evaluating if it fails and then redirect them to a hard-coded login link would be about the only way to improve this very much needed Portal add-on or perhaps even go the full way and the login link contains the page to go to after login for the 5 Ticket Types:
Ex. https://support.cireson.com/Login/Login?ReturnUrl=%2fIncident%2fEdit%2fIR41207%2f
Some quick testing:
- Customspace is not protected by forms based authentication, probably only the asp.net mvc controllers which serves content that is. This means that my script actually runs and I'm able to do something about it!
- The 'ReturnUrl' query param accepts an url with queryparams as long as they are url encoded so this url works: https://support.cireson.com/Login/Login?ReturnUrl=%2Fcustomspace%2Feditworkitem.html%3Fid%3DIR41207
With above in mind I could wrap something up so that when forms based authentication is used the login url is used instead.
Another option would be for those using form auth to use the above url encoded url in their templates instead!
I agree that as a quick fix Cireson should update their email notification templates with that improved URL!
If you can dynamically determine which url to use, maybe Cireson API allows you to tell if forms authentication is in use and if current person is logged in or not, your version of the url is definitely the way to go if it turns out they must login.
I've found the best user experience is minimal effort required by the user. Convenience.
Switched back and forth in my test environment between Windows- and Forms auth and tested with Chrome, Firefox, Edge & IE11 without any problem!
Fantastic, thank you!
I prefix the work item id with DEV, TEST, or PROD based on the environment. I was trying to get this to redirect to the correct environment based on the work item id so I didn't have to change the url in every notification template after migrating from one environment to the other. No matter what type of javascript redirect I've tried to use I can't get it to open the work item.
Do you have any ideas to make this work that way?
Work with portal V8 and windows auth.
I know this is old, but I am trying to implament this and not having any luck. Can some in give me an notification example?
I am using SCSM Notifications with the following information for ID (<a href="http://servicedesk/portal/sitepages/my Requests.aspx?RequestId=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$</a)
Should I replace the entire line with your line?
The portal path is ...CiresonPortal\CustomSpace , I have tried your example and it still does not show the ticket form
Any assistance would be helpful as I have close to 40 notifications to modify
If you use Visual Studio Authoring Extensions (VSAE) to generate your management packs, there is one other potential issue: If you store your HTML templates as resources in the management pack, rather than inputting them directly into the template wizard in the console, or including them directly inside the template object in the management pack, then VSAE might be tossing out your reference to System.WorkItem.Library if it does not see the alias used anywhere in your MP (because it is actually in your bundled HTML file). An easy hack to fix this is to create a template that uses the reference anywhere, be it in the subject or body, in the text of the MP fragment. You do not need to add a subscription to this template, or even specify any recipients; it just needs to exist so that the references are respected.
If it does not work in the address bar of your browser, @Martin_Blomgren included some very precise instructions (which worked like a charm for our site), but it appears that you are using different folder and file names, and that is causing the issue. That is not necessarily a bad thing to do, but it does mean that some translation is needed.
If your portal is reached at http://myportal/ then you would make your URL's point to http://myportal/CustomSpace/EditWorkItem.html?id=IR12345. If your portal is reached at http://myportal/portal/ then it would be http://myportal/portal/EditWorkItem.html?id=IR12345. If you changed the name of Martin's file, then you would replace EditWorkItem.html with the new name.
Sorry I wasn't clear, the herf I posted was the old one before @Martin_Blomgren change. Here is the one I changed it to: (<a href="http(s)://<servername>/CustomSpace/EditWorkItem.html?id=WORKITEMID=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$</a)
It does work fine in the browser when typed in manually with the ticket number, but not when you click on it in the email. I did not make any changes to the System.WorkItem.Library management pack. I have had several people test it since I am an admin and everything always works for me, they are reporting the page not found error.
(<a href="http(s)://<servername>/CustomSpace/EditWorkItem.html?id=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$</a)
Martin,
Thanks was having a du moment.... Only problem is that we set the default page for the customer to the Home page and when they click on the link it takes them there. So I guess in a way its working. Any ideas on how to get around that?
Which class are you targeting by the way?
@Martin_Blomgren, the class is Servcie Request (new ticket)
This url takes you to the Home page of the portal https://servicedesk.xxxx.xxxxx.xxx/ServiceCatalog/Listing/#/
Here is the template code I am using to point to the ticket ID
<td bgcolor="white" colspan="2"><strong>Service Request ID:</strong> <a href="http://servername:80/CustomSpace/EditWorkItem.html?id=$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$">$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Id$</a <br>
Can I ask how you got the red bubbles on your left hand navigation?
https://community.cireson.com/discussion/1632/active-work-items-badges-on-menu-items#latest