5 Replies Latest reply on Oct 15, 2013 8:54 AM by Adam Wilden

    Query against an Action?

    Adam Wilden Expert

      Hi Folks,


      Still being pestered by the Service Desk for more stats (their manager went on a Course ) so I've started pushing as much as possible onto themselves via WebDesk, which allows them to knock up quite a lot of their queries themselves.


      But I'm stuck on quite an obvious one (at least I think it's obvious but I've only ever run stats against collections).


      Our users don't categorise when logging calls, our Service Desk does this.  They select an Incident category and then click on a winodwless action (called Categoirised).


      This is ususally the frst action that SD staff carry out so they understandably need to know the average time from the call being first logged to being categorised.


      (Actually they want to know this for each category, and almost certainly they'll want the stats to sing and dance... ).


      Any idea how I can access the timestamp for when the call was categorised?  Or do I need to hit the audit table? (and if so - help!).


      Many thanks.



        • 1. Re: Query against an Action?
          Julian Wigman ITSMMVPGroup



          My suggestion wouldn't help for existing Incidents but what I was thinking would be to have a datetime attribute on the Incident BO that is set from an automatic action following your "categorised" windowless action in the process.  In the field on the automatic action use a BOO calculation and set to now().


          This way it stores the date time it was categorised for easy reporting later.





          • 2. Re: Query against an Action?
            karenpeacock SupportEmployee



            If you would like to extract data from the Audit Trail here is some information about this:




            Best wishes


            • 3. Re: Query against an Action?
              Adam Wilden Expert

              Thanks Guys,


              I think the auto action is probably simplest but having said that I can't get it working!


              I've added a DateTime attribute to the Incident BO but think I must be going wrong somewhere on the Process side of things.


              I've created an Automatic Action immediately after my "Categorised" windowless action.


              Not sure where to add the calc though -  If I double click the new action, my Incident window opens and I can add the calculation to my new attribute that way which is hwat I've done.


              To test I open a new Incident - the new attribute automatically fills with the current date/time.  I wait a few minutes and click the Categorise action but the new date field does not update.  I can see that the process is flowing correctly


              The calculation is simple:


              import System

              static def GetAttributeValue(Incident):

              Value = DateTime.Now

              return Value



              Not sure where  I'm going wrong.



              • 4. Re: Query against an Action?
                Adam Wilden Expert

                Hi Guys,


                They now also want to be able to report on who originally categorised the call as well as teh timestamp so I think it's probably easiest to create a new collection to record the time and current user etc.


                I should be able to cope with this but many thanks for your suggestions and advice.


                Cheers - Adam.

                • 5. Re: Query against an Action?
                  Adam Wilden Expert

                  Hi Guys,


                  This one has come back again so  back looking for advice 


                  Just need some way of creating a query within WebDesk to get business time between creation date and our "Categorised" status which follows  a windowless action.


                  The actual calc will be simple:


                  TimePeriod = Incident.GetBusinessTime(Incident.CreationDate, *Categorised-Date*)

                  return Int32.Parse(String.Format("{0}", Math.Floor(TimePeriod.TotalMinutes))) + 1


                  The solution doesn't need to unclude existing calls so can be something new...


                  Julian's suggestion seemed sensible but I didn't manage to get it working before.


                  Any bright ideas?


                  Cheers - A.