Home Cireson Uploads

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.


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.

Calendar Colors in the Cireson Portal

steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭


  • Peter_SettlePeter_Settle Customer Advanced IT Monkey ✭✭✭
    Excellent, just what I have been looking for.
  • Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭

    Hrmm for some reason I just get a blank page when I try and load this in v7.0.3 of the portal.

    Is there a trick to get this working?



  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭
    There shouldn't be.  Sounds like maybe the files aren't loading correctly.  Do you get any errors when you go into Developer Tools (F12) and reload the page?  Can you post your files here and I'll check it out?
  • Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭

    I got it working in the end..

    It was just a typo on my end. :)

    Thanks again!


  • Matthew_CuMatthew_Cu Customer IT Monkey ✭
    I am looking to add a few additions to this calendar. 

    1) I want to set my color for the events based on the Category for the Change Request. I can't seem to find this information in the service management DB. The Service Manager DB holds this information in the [dbo].[MT_System$WorkItem$ChangeRequest] - Category_7B1892FE_108AEC85_064D_7815C2DFC442 field.

    I noticed the Workitem table includes a category field however this is linked to the Area field on the portal (not what I want).

    I attempted to use temporary tables and views however the API doesn't seem to like using these SQL abilities. I was able to make create new tables and update them with a trigger however this stops both Cireson and SCSM2012 from updating an existing CR.

    2) I also want to include MA's which are a child for a change request even if they are also a child within a Parallel Activity at the same time. The WorkItem table includes a ParentWI field but for CR linked MA's this is empty. 

    Would you have any ideas how I can achieve both of the above?


  • Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭
    edited September 2017
    MAs would be doable, but tricky.
    We had a requirement to identify what step in the Change Process the CR was in, e,g,: Pending QA, Pending Approval, Pending CAB, Pending Implementation etc.
    To do this, we created additional statuses on the parent CR, and whenever the relevant MA went in progress, we would automatically update the CR with the corresponding status.
    We then color coded all of our CR's based on the current status (rather then the category).
    This prevented the need to display the related MA's in the callendar.

    Regarding the ParentWI field. THis is only used for parent / child relationships with incidents, where you have a parent incident and related child incidents. It is not used for MAs / RAs etc.
    In this scenario, we have created a separate table which is populated when Work Items are created, and Work Items are updated, which contains a bunch of additional fields which we oftern need to 'efficiently' reference without SQL Joins to be used for dashboards, reports, calendars etc. Just one of the fields in this table is the GUID of the Parent Work Item that the MA is related to.

    Regarding the category field.. What do you currently use this field for, Minor / Major etc.?

  • Peter_SettlePeter_Settle Customer Advanced IT Monkey ✭✭✭

    @Adrian_Paech Am really interested in the CR progress displaying in the calendar. I know that we would need to amend the Change Status list to include the extra options i.e. "Pending Implementation" etc.

    However how are you getting the status to change on the CR?

  • Adrian_PaechAdrian_Paech Customer Advanced IT Monkey ✭✭✭
    We trigger workflows to run whenever an MA or RA status is changed to "in progress". Its at this point we run a powershell script which does a bunch of stuff, but one of the things it does is check to see if the MA / RA is part of a CR, and if it is, looks at the title of the MA / RA, and based the title, sets the CR status accordingly. 
    We have consistent titles in our MA / RA for CR's so we dont ever get any issues with this.
    I guess if someone wanted to mess with the system, they could change all of the titles of the up-and-coming MA's / RA's within a CR before they go in progress, and this would stop the process from working correctly, but we have not had an issue up until now.
    Hope this helps.
  • Eric_KrasnerEric_Krasner Customer Advanced IT Monkey ✭✭✭
    I have downloaded the files, followed the article and instructions and yet i get a blank calendar and cannot figure out why.  I run the sql query in mgmt studio and get the desired results. Yet after encoding and adding to the html file, i get nothing.  Any ideas?

  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭
    Can you validate if the API call is returning results?  Go into Developer Tools from a browser (F12), click the Network tab, and then navigate to the Calendar Page.  Find the "GetDashboardDataById?..." call and look to see if anything was returned in the response.

  • Justin_ClarkeJustin_Clarke Customer Advanced IT Monkey ✭✭✭
    Hi Steve,

    Fantastic solution for change calendars. I am testing this and have come across a strange issue where if i set a risk on a change i get many duplicates on the calendar. Have you seen this before or have i missed something?

    Thanks for your help
  • Marek_LefekMarek_Lefek Customer Advanced IT Monkey ✭✭✭
    This can be if you are using more languages than only English. Try run the SQL (var query) from file CustomCalendar.html, line 20 and it wil give you double entries this is it.

    If you can display calendar only i one language, you need to add new line with condition for localization code:
    <br>AND RiskDS.LocaleID ='PLK'
    Just can copy encoded below to url. Only change PLK for your language code.
    If you use multiple languages this script need to be change to be able to  use @LanguageCode tag. I try it now, but it won't works.
  • Justin_ClarkeJustin_Clarke Customer Advanced IT Monkey ✭✭✭
    Fantastic work Marek, this was indeed my issue. Calendar working well. Much appreciated
  • Marek_LefekMarek_Lefek Customer Advanced IT Monkey ✭✭✭
    Thats great!
  • Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭
    Anyway or anyone had any luck in querying a different data source instead of ServiceManagement?
    The reason being in that we would like to create another calendar using this easy approach that will sit along our existing calendars,  but contain data that we do not want to create tickets for. (Think a calendar of events/changes planned for the year, where we do not desire to create tickets ahead of time to skew our metrics)
  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭
    You should be able to create a new Dashboard Datasource through Admin Settings -> Data Source Settings in the Portal.  Then you can create a Dashboard Query that points to this Datasource through Dashboard Query Settings.  What this will do is create a new Dashboard Query that has an Id that can be used in an API call.  The GetDashboardDataById API call takes in an Id as the parameter.  You can find that Id by pulling up the Dashboard Query Settings Grid and then tell it to show the Id column (it is hidden by default).  The Calendar customization would look very similar but you would update the API calls to use this instead. 
  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭
    The other thing to validate is that your Portal Service Account has permissions to run that query on the new Datasource.
  • Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭
    Fantastic! I was reading over the API documentation before creating this post and Data Source/Query data with the hopes it would be this easy. Elated to hear that it actually is this easy, thank you @Steve_tuel, I appreciate the quick feedback and guidance. Much appreciated!
  • Brad_McKennaBrad_McKenna Customer Advanced IT Monkey ✭✭✭
    edited February 2018
    Need some guidance on my customization if possible. I am able to validate the api call/array is being passed as I am dumping the array to the Dev console.  Although the array is being obtained, the Calendar remains blank/empty. The ID column was added to the SQL table to use for ID within the kendoui scheduler config.

    Attached is the code we are using where we changed the code initially provided.
    The array below shows data we made up to try out the concept.

    Any help is appreciated.
  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭

    I'm kind of stumped on this one.  Everything looks correct in your HTML file.  The only different is that ID column and the fact that it isn't a string.  I'm not sure how that could/would effect it but that is the only difference I can see.

  • Dean_LinternDean_Lintern Customer IT Monkey ✭
    edited June 9

    Works fantastic with a few tweaks here and there for our environment. Thank you!

    I have an issue with the click on a CR to open it. Its doing nothing, any ideas? (I have not changed any of the original code on this bit)

    "One quick note, I added some additional logic that allows you to click on the CR and it will open it in a new window. Line 57-66 adds a click event to the scheduler that when clicked will call the openWI function (Line 67-69).


  • Dean_LinternDean_Lintern Customer IT Monkey ✭

    We have resolved this with a slight change to the var id = title.split(": ");

  • steve_tuelsteve_tuel Cireson Consultant Adept IT Monkey ✭✭

    I just wanted to post an updated version of this that uses the "GetDashboardDataById" API call instead of the legacy "GetDashboardQueryData" API. The legacy API runs a SQL Query directly in the call which is seen as a Security Vulnerability. There is a setting in the Setting Items called "EnableDashboardLegacyAPI" that controls the use of the API. If your company requires this to be turned off or you just want to use a more secured approach, follow the steps below:

    1. Extract and Copy the "ActiveChangeCalendar" folder into CustomSpace.

    2. Run the Active Changes-INJECT.sql Query against your ServiceManagement Database.

    3. Copy the "ActiveChangeCalendar.js" file into CustomSpace\views.

    4. Copy the "ActiveChangeCalendarVP.js" file into CustomSpace\views\viewpanels.

    5. Navigate to "http://yourportalserver/view/ActiveChangeCalendar"

    This approach will inject a SQL Dashboard Query in your ServiceManagement Database that contains a unique GUID. It then uses the newer API call which only uses the unique GUID.

Sign In or Register to comment.