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.
Show CR Activity History in the Portal
,------. ,------. ,---. ,------. ,--. ,--.,------. | .--. '| .---' / O \ | .-. \ | `.' || .---' | '--'.'| `--, | .-. || | \ : | |'.'| || `--, | |\ \ | `---.| | | || '--' / | | | || `---. `--' '--'`------'`--' `--'`-------' `--' `--'`------' |-------------------------------------------| | Show Activity History Tasks Install Guide | |-------------------------------------------| Append the contents of custom.js to the custom.js file found in C:\inetpub\CiresonPortal\CustomSpace on ALL over your portal servers. Append the contents of custom.css to the custom.css file found in C:\inetpub\CiresonPortal\CustomSpace on ALL over your portal servers and change the colour to meet your needs. Copy the template HTML file to C:\inetpub\CiresonPortal\CustomSpace on ALL of your portal servers. Refresh your browser to see the task.
Comments
http://www.systemcentercentral.com/get-user-marked-manual-activity-completed-scsm/
Is it possible to add it to the function ?
Today, we only have the workflow user in the history (as in the console).
The "position: fixed" seems to fix the "Close" button to the bottom of the main window, rather than the pop-up window. Is there an easy way to fix this up without breaking Chrome?
This section of the code, loops through the Activity array of the CR / SR and compliles a list of Activites for the Drop down.
You will need to do a iterative loop into the Activity array on each activity to find nested activities and add them to the list. Once in the list, the rest of the code will work as it will just pass the Title and Id to the function that grabs history and displays it in the window.
Geoff
Thank you Geoff! When attempting to create on my own, I ran across this post:
https://community.cireson.com/discussion/355/view-manual-activity-history-in-the-portal
This looks similar to what you had suggested, and provides the ability to find all activities. (Although with this suggestion the creation of the custom task was altered to accommodate calling the function)
I'm trying this awesome customization out with Change Requests and when I look at an RA where a reviewer has been added or removed, it lists the item as a number versus the actual object (user display name) as shown in the screenshot below.
Is there anyway to force this script to show the actual user that's being removed or added to the review activity?
Any assistance you can provide would be most helpful!
Thanks,
Jonathan Boles
This is one of my extensions so I'll jump in.
Its to do with the 'double hop' relationship between RA and User. An RA has a Reviewer (these get assigned just a number) and a Reviewer has a User. So the History of the RA is correct that a a Reviewer of ID 49 has been added.
To get the Actual User, we'll need to dive one level deeper in the case that the relationship is ReviewActivityHasReviewer. You would have to call the GetProjectionByCriteria API call to get the Reviewer object with the Type Projection of System.ReviewerProjection and this will include the User Object.
Is that enough to get you going?
Geoff
One thing I did in our environment was add in an Or statement (||) to only show the task when the ticket has activities (using the code referenced in my post above).
From:
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
formObj.boundReady(function () {
var vm = pageForm.viewModel;
//If the user is not an analyst, hide the task
if (!session.user.Analyst) {
$(".taskmenu li:contains('Activity History')").hide()
}
});
return;
});
To:
app.custom.formTasks.add('ChangeRequest', null, function (formObj, viewModel) {
formObj.boundReady(function () {
var vm = pageForm.viewModel;
var length = vm.Activity.length;
//If the user is not an analyst, hide the task
if ((!session.user.Analyst) || (!(vm.Activity.length > 0))) {
$(".taskmenu li:contains('Activity History')").hide()
}
});
return;
});
@Peter_Miklian here is an updated copy that includes all the activities inside PA's and SA's, and also adds a configuration variable to at the top, that can be set to allow for Admin only (0), Admin/Analyst Only (1), or have the menu option on the right for everyone (3)
@Jeff_Lang
Do you have an updated version of that file?
Yours doesn't display the activitiy information propper (in the detail window) anymore (Version 10.2.6)
Thanks in advance!
Is there an update planned? The task is used a lot in our environment.
With update 11.0.4 it doesn't display the buttons on the front page anymore.
Thanks in advance!
I believe I've righted this. Updated from @Jeff_Lang's above. Tested with v11.x
@Adam_Dzyacky thank you for the fast updated version.
Tested it already, looks great! ;)
@Adam_Dzyacky , I feel like I was just asking for something like this ;)
Now to shoe-horn this into History (maybe with some filtering on inconsequential data)
Thanks also to @Jeff_Lang and @seth_coussens
@Adam_Dzyacky
Thank you for the update!