Calendar Colors in the Cireson Portal

steve_tuelsteve_tuel Cireson Consultant IT Monkey ✭

Comments

  • 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?

    Regards,

    Adrian

  • steve_tuelsteve_tuel Cireson Consultant 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!

    Adrian

  • 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?

    Regards,

    Matt
  • 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 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:

    AND RiskDS.LocaleID ='PLK'
    Just can copy encoded below to url. Only change PLK for your language code.
    %0AAND%20RiskDS.LocaleID%20%3D%27PLK%27
    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 Adept 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 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 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 Adept 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 Adept IT Monkey ✭✭
    edited February 22
    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 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.


Sign In or Register to comment.