IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.
DISCLAIMER
All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.
Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.
Dont forget to checkout solutions uploaded by our customers, partners and community members here.
Portal add MA to SR Task
Enhancement: Add Manual Activity to a Service Request.
Steps to Complete:
- Copy the .js contents into your CiresonPortal\CustomSpace\custom.js file.
- Copy the customtasks.addma.html file to your CiresonPortal\CustomSpace folder.
- Refresh browser.
- Open a Service Request and click the “add ma” task.
Notes:
- f the Service Request is Completed, the Add MA task will not show up.
- If there aren’t any activities it will disable the “Add Activity After” drop-down.
- The “Add Activity After” drop-down will pull in only the In Progress Activity and all subsequent activities. This is so someone can’t add an Activity out of place.
- If they select a Parallel Activity a checkbox will appear that gives them the option to add the Activity within the Parallel Activity. If the Parallel Activity is In Progress, the Manual Activity will be set to In Progress. If the Parallel Activity is not In Progress, the Manual Activity will be set to Pending.
Download the attached .zip file below.
Comments
This doesn't work for us.
Our custom.js file calls js scripts from a folder for each task. I placed the js code and html file into this folder and add into the custom.js file to call for it, the "add ma" task shows under Tasks but when I click it I see some questions showing up at the bottom of the page, kind of hard to read. We should get a pop up window?
OR
Just store the HTML file in the root of your CustomSpace directory. Either one of those should fix it.
Thank you
This doesn't work if the SR has no activity. Any way to make it work with no activity in SR?
Yes with some minor modifications I have attached what I did to the script to use in our environment. (I copied the text out of the custom.js and put it into a plain txt file) the other 3 files are the dependent html files.
it will allow you to add manual, review or parallel activities to SR or CR. (you can easily take out sections if you don't want them to have the ability to add all types.)
Is anyone still using this?
Also to fix the issue if there are no existing activities. You will need to find all of these lines:
console.log (startpos + " - " + vm.Activity[startpos].Title)
And surround it with a simple range check.
if (length > 0 ) {
console.log (startpos + " - " + vm.Activity[startpos].Title)
}
I'm new to JS, so I'm self-learning. I opened the web console and saw a failure where vm.Activity[startpos] is out of range, because there are no existing activities. Once I made this change to the script, it started working as designed.
Edited* Realized my post wasn't relevant to the topic
"Status": {HierarchyLevel:0,HierarchyPath:null,Id:"11fc3cef-15e5-bca4-dee0-9c1155ec8d83",Name:"In Progress"},
My organization probably wouldn't have let me switch to the Cireson portal without this customization. Of course, activities could've always been added by an admin or BA using the console, but where's the joy in that when the portal is already so good. Add it in the base solution!
I'm wondering if there was a change to the commit api made in the latest releases.
I fixed both of these issues in my version of the Add Activity task. Here's the link if you want to try it: Add Activity Task
Make sure to take the latest version available in the latest comment.