Home Self-Service Portal - Community

Change Requets are removed from Change Calendar when completed/closed and dont appear in "My Work"

Hi All,

Is there a way to have Change Requests to appear within "My Work, My requests etc" tab.

The below two issues have been raised by staff using CRs and i have done a quick test and confirmed the issues.

1.      There is no view where you can see what changes you have raised so the only record of them is in the calendar or the initial email which is sent to you. Changes should be visible in the “My requests” or “My Work” tab. This also hampers the ability to identify which changes you have completed and which you have pending.

 

2.      By have completed changes immediately disappear off the change Request Calendar it removes one of the most useful features, the ability to determine what work has been completed by others when you informed of an issue with a system that may have recently undergone a change.

Below is a view of my requests tab which is showing only IRs and SR's but i have plenty of CR's but it doesn't show them.


is there a way i can get CRs to be visible within the views? this is for both active and closed ones. the active dones only just appear in the calendar and not the dashboards.


Thank you.

Answers

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited October 2019

    Leveraging Cireson Advanced Request Offering, you can build Request Offerings that are based on Change Request templates and publish to those to the portal. Similar to how you would do so for Service Requests.

    The key advantage being - Change Requests submitted through the ARO in fact set the submitter as the Affected User which results in those Changes appearing in the "My Requests" tab.

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    Thanks @Adam_Dzyacky that does make sense.

    The issue is we are already live with change requests through templates and access is only to IT staff.

    making it available through RO will change the way it works completely and i will also need to restrict access as well. Currently the self service portal RO's are all visible to all our staff.

    is there any other way?

    if not, how would i go about restricting access/visibility to certain RO's on the self service portal?

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited October 2019

    "Currently the self service portal RO's are all visible to all our staff"

    So that would have to change. Service Offerings and Request Offerings need to get scoped by AD Groups and SCSM Permissions as seen in the Admin -> Security -> User Roles. Then add an RO based CR to a Service Offering that only your IT staff could see.

    I can appreciate the "weight" of redesigning internal processes such as this. So the good news is there is still another way to do this without disrupting everything. Place a Runbook (SCO, SMA, or Cireson PSA) as the first activity in your CR template. That runbook would have one single purpose - get the Created By relationship (e.g. the submitter) and then set that user on the Affected User relationship.

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    Thanks @Adam_Dzyacky

    i noticed we do have a SO and ROs within the SO that are currently only visible to IT staff. how ever when i look at user roles i cant see it being restricted for the typical end user.


    is there a guide i can follow to restrict access to Service offerings and Request offerings.

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    also, is there a way that the closed/completed change requests stay within the calendar? so staff can go back and view the changes? i guess that will mean javascript file?

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    i extended the change request class to include "affected user' and updated the custom.js file. it appears on the portal form but when i add affected user and save, it seems to save but it doesn't. Once the page refreshes the field is blank.

    did i miss something?

    i guess my main thing is to ensure a way for IT staff to keep a track or eye on their CR's even if they are closed.

    if i can update the change calender to include closed CRs that would be great.


  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    "is there a guide i can follow to restrict access to Service offerings and Request offerings."

    I'd defer to Microsoft documentation


    "also, is there a way that the closed/completed change requests stay within the calendar? so staff can go back and view the changes? i guess that will mean javascript file?"

    Yes. If you're looking to modify or do something custom with a calendar it would demand custom JS.

    i extended the change request class to include "affected user' and updated the custom.js file. it appears on the portal form but when i add affected user and save, it seems to save but it doesn't. Once the page refreshes the field is blank.

    I'm not sure that class extension was necessary. By doing nothing more than submitting a CR through an ARO, the Affected User is set by virtue of the submission. If not through an ARO, then all that should have been required is modifying the ChangeRequest.js form so as to provide a mechanism to control the already existing relationship.

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    i may have over complicated things. i will try and focus on setting it all through ARO.

    so i wanted to updated the changerequest.js (forgetting about all the extensions i did).

    i opened the management pack in authoring tool and the "affected user" relationship is already there. So is the created by user.

    the created by user is set in the js file but affected user wasn't.

    when i try and add affected user based on the already existing relationship it doesn't work. i may be setting the internal name incorrectly but have tried a few things and it doesn't work.

    any ideas on how i can find the internal name?

    also, im really bad at creating .js files. is there one already out somewhere that doesnt delete/remove the change requests from the change calendar?



  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    sorry for all the messages.

    The cireson change calendar has the option to show cancelled, failed and closed CRs within SCSM.

    How ever it doesn't within the portal so besides custom code there is no other way to have that appear?


  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    edited October 2019

    any ideas on how i can find the internal name?

    1. Open up a Work Item (IR, CR, etc.) in the portal in Chrome
    2. Open up dev tools (F12)
    3. Go to the Console tab
    4. The following that is case sensitive and hit enter -> pageForm.viewModel
    5. Expand the Work Item object that is returned (this is the data/object that makes up the Work Item page you're currently looking at.)

    This allows you see the property names that make up the page. In the case of "Affected User" I believe you're looking for "RequestedWorkItem". To customize the ChangeRequest.js form just copy it over to "c:\inetpub\CiresonPortal\CustomSpace\WorkItem". In doing so, it will take precedence over the stock ChangeRequest.js.


    On the topic of the Calendar - this is something I and others have voiced around the lack of parity between the Console and Portal. So it unfortunately requires custom.js to make happen. The good news, is there are a few articles on how to build a custom Change calendar.




  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    thanks @Adam_Dzyacky

    the "requestedworkitem" worked and now affacted user appears in the changerequest.js and it saves.

    i have placed the changerequest.js template under D:\InetPub\CiresonPortal\CustomSpace which includes our customised IR and SR templates.

    the D:\InetPub\CiresonPortal\CustomSpace\workitem folder is empty and has no templates.

    our out of the box templates seem to be stored under

    D:\InetPub\CiresonPortal\Scripts\forms\templates

    is this sufficient? or do i still need to add the customised changerequest.js within D:\InetPub\CiresonPortal\CustomSpace\workitem folder.

    also as for the change request calender, will ammending the SQL code that ran against the servicemanagement dbo to note removed closed, completed and cancalled CRs be sufficient as well?

    the below is the query that ran;

    --use a GUID generator to create some new guids for your view panel and navigation node. NOTE: All guids must be completely lower case.

    --you can run this query three times in SQL to generate the guids you need.

    -- SELECT LOWER(CONVERT(nvarchar(39),NEWID()))

    DECLARE @NavNodeGuid nvarchar(255)      = '4f962bc3-61ba-4b95-a311-fa00b2c61e30';

    DECLARE @ViewPanelGuid nvarchar(255)    = '6de60ec7-9b5d-4aad-9da9-3c77b5ac0e6f';

    DECLARE @DataSourceGuid nvarchar(255)   = 'f177dd61-5cd9-4f78-95c9-f8987a69edca';


    --this query selects all the active Change Requests in the WorkItem table

    DECLARE @Query nvarchar(max) =

    'DECLARE @SystemWorkItemChangeRequest uniqueidentifier = ''e6c9cf6e-d7fe-1b5d-216c-c3f5d2c7670c'';

     DECLARE @ChangeStatus_Cancelled uniqueidentifier = ''877defb6-0d21-7d19-89d5-a1107d621270'';

     DECLARE @ChangeStatus_Failed uniqueidentifier = ''85f00ead-2603-6c68-dfec-531c83bf900f'';

     DECLARE @ChangeStatus_Completed uniqueidentifier = ''68277330-a0d3-cfdd-298d-d5c31d1d126f'';

     DECLARE @ChangeStatus_Closed uniqueidentifier = ''f228d50b-2b5a-010f-b1a4-5c7d95703a9b'';

     SELECT w.Id, w.WorkItemId, w.WorkItemId+'' - ''+w.Title as Title, w.Description, w.ScheduledStartDate, w.ScheduledEndDate

      FROM [WorkItem] w

     WHERE w.ClassId = @SystemWorkItemChangeRequest AND w.StatusId NOT IN (@ChangeStatus_Cancelled, @ChangeStatus_Failed, @ChangeStatus_Completed, @ChangeStatus_Closed)';

    --this is the text which will be shown in the portal menu

    DECLARE @MenuTitle nvarchar(255)        = 'Change Request Calendar';

    DECLARE @Locale nvarchar(3)             = 'ENU';                                                            


    --this just deletes it if it already exists so that you can iteratively tweak it and recreate it easily

    DELETE FROM DisplayString WHERE ElementID = @NavNodeGuid and LocaleID = @Locale;

    DELETE FROM NavigationNode WHERE Id = @NavNodeGuid;

    DELETE FROM ViewPanel WHERE id = @ViewPanelGuid;

    DELETE FROM DataSource WHERE id = @DataSourceGuid;


    --this creates the query which will be used as the data source for the calendar

    INSERT INTO dbo.[DataSource] (Id, ConnectionString, Query)

    VALUES ( @DataSourceGuid, NULL, @Query);


    --this creates the navigation node display string

    INSERT INTO [dbo].[DisplayString] (ElementID, LocaleID, DisplayString)

    VALUES (@NavNodeGuid, @Locale, @MenuTitle);


    --Create the navigation node.

    INSERT INTO NavigationNode(Id, [Definition], Ordinal, Sealed, IsPublic, IsVisible, LicenseRequired, IconClass, ParentId, Location)

    VALUES (

    @NavNodeGuid,

    '{"Id":"' + @NavNodeGuid+ '","layoutType":"full","view":{"header":{"title":"' + @MenuTitle + '","subTitle":""},"body":{"content":{"rows":[{"columns":[{"ColSpan":12,"type":"viewPanel","ViewPanelId":"' + @ViewPanelGuid + '"}]}]}}}}',

    2,0,0,0,'DASHBOARD', NULL, 'E99B6A93-E536-442E-839F-67A99B439297','6CFC4D00-D8EB-4F51-B63D-F776576CF25A');


    --Create the view panel

    INSERT INTO ViewPanel(Id, [Definition], TypeId)

    VALUES (

    @ViewPanelGuid,

    '{"Id":"' + @ViewPanelGuid + '","type":"calendar","content":{"queryId":"' + @DataSourceGuid + '", "views":["day","week","month","agenda"],"id":"WorkItemId","title":"Title","description":"Description","startDate":"ScheduledStartDate","endDate":"ScheduledEndDate"}}',

    'calendar'

    );

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    Thanks for all your help adam.

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    i have placed the changerequest.js template under D:\InetPub\CiresonPortal\CustomSpace which includes our customised IR and SR templates.

    the D:\InetPub\CiresonPortal\CustomSpace\workitem folder is empty and has no templates.

    our out of the box templates seem to be stored under

    D:\InetPub\CiresonPortal\Scripts\forms\templates

    is this sufficient? or do i still need to add the customised changerequest.js within D:\InetPub\CiresonPortal\CustomSpace\workitem folder.

    CiresonPortal\Scripts\forms\templates = this is the stock folder. every upgrade these items are overwritten. So while you can edit these, prepare to lose the change every upgrade.

    CiresonPortal\CustomSpace\workitem = this was introduced in the last couple versions as a dedicated place to store form customizations. you can drop form customizations in here or...

    CiresonPortal\CustomSpace\ = the original since v1 days folder for storing customizations. form template customizations can also sit here on the root


    As far as the calendars, sql, etc. goes - yes, you should modify them! Those articles serve as really fantastic primers for getting started which should arm you with some basic knowledge on how to modify them further. My only advice here would be just deploy them as is and get them working first. Then go back and customize so the learning process is as iterative as can be.

  • Mina_SaidiMina_Saidi Customer IT Monkey ✭

    Hi @Adam_Dzyacky

    i have been folliowing the guide within the below blog and its quite good. Am able to get the calender to load etc but i still cant get it to show all CR's regardless of their status.


    https://cireson.com/blog/calendar-colors-in-the-cireson-portal/


    my DBA has given me the below SQL Query and when we run it in SQL it shows all CR's plus their impact. We don't use 'risk" we use "impact" in our environment.


    SELECT DisplayName, WorkItemId, RiskDS.DisplayString as Impact, (SELECT Dis.displaystring from DisplayString as Dis where Dis.ElementID = Wi.StatusId) AS StatusName, ScheduledStartDate, ScheduledEndDate from workitem WI

    LEFT OUTER JOIN

    DisplayString RiskDS

    ON RiskDS.ElementID = WI.Impact

     

    WHERE ClassId ='E6C9CF6E-D7FE-1B5D-216C-C3F5D2C7670


    the SQL runs correctly and output is correct within SQL, how ever when i encode the above query to URL output and place it within the customcalender.html, it doesnt work. the calendar loads but doesnt display any CRs at all.

    SELECT%20DisplayName%2C%20WorkItemId%2C%20RiskDS.DisplayString%20as%20Impact%2C%20%28SELECT%20Dis.displaystring%20from%20DisplayString%20as%20Dis%20where%20Dis.ElementID%20%3D%20Wi.StatusId%29%20AS%20StatusName%2C%20ScheduledStartDate%2C%20ScheduledEndDate%20from%20workitem%20WI%0ALEFT%20OUTER%20JOIN%20%0ADisplayString%20RiskDS%20%0AON%20RiskDS.ElementID%20%3D%20WI.Impact%0A%0AWHERE%20ClassId%20%3D%27E6C9CF6E-D7FE-1B5D-216C-C3F5D2C7670%0A

    output is in UTF-8 format, but i have tried ASCII and that doesn't work as well.


    am i doing something wrong? i have added my customcalenderHTML version.


    am i missing something?


    any ideas or help will be appreciated.


    Thanks.

Sign In or Register to comment.