4 Replies Latest reply on May 8, 2012 2:11 AM by trehan

    Single Incident & Incident Task Query

    Julian Wigman ITSMMVPGroup

      Anyone know how to produce a single query (to save on Dashboard spac) that contains both Incident and Incident Tasks?


      I know I can use pm_process as my root business object for the query.  Trouble is that if I do this I can see no way to get at the Incident Ref # that the task relates too.  ID always shows as zero on the Task Incident lines and you cannot drill down to find the ID as far as I can see.



        • 1. Re: Single Incident & Incident Task Query
          aparker Employee

          Hi Julian,


          As you rightly say, the only way to display both Incident and Tasks on the same query is to write that query on pm_process. Because of the way in which the relationship exists between Tasks and the main process that they are linked to, in other words it's a collection although they are processes, the ref number they are assigned is always zero and they are instead given a collection reference. Prior to 7.3.0 there was no simple way of holding the information and some cases the solution has been to use a database trigger to populate an additional field that holds a more complex reference to the main process or it's related tasks. With the arrival of 7.3, we now have the ability to do this within the product using the calculation functionality. A new attribute can be created on the Process object and it's content can be calculated to provide this more meaningful value.



          • 2. Re: Single Incident & Incident Task Query
            Julian Wigman ITSMMVPGroup



            Good suggestion.


            So I can put a reference number attribute on pm_process ("Process" business object) with the same datatype as say Incident Ref #.  I put a "before read" calculation on this field.  With you so far!


            The bit I'm not sure about though is what am I putting in the calculation; do you have an example?   I cant see a way of getting the the relevant I, P or C ref # to put in the calculation as this attribute does not seem to be available (same as per QueryTool) to include. If it was thien surely I'd just be able to include it same way in my Query Tool query.




            p.s Also I'd need to back populate the existing data in the DB too to be consistent so I'd need to write a SQL script to do this I guess.

            • 3. Re: Single Incident & Incident Task Query

              Hi Julien,


              did youfind a solution for this?


              I stuck at the same problem.

              My aim is to get a combined ID, e.g. IncidentID-TaskSerialNumber like 233-2.


              But I am not able to calculate the TaskSerialNumber on pm_process.


              Maybe you have a hint for me?




              • 4. Re: Single Incident & Incident Task Query

                Dear Andy,


                I have a query regarding the System Filter. There is default system filter name "Configuration Item Types By User". I want to create similar filter but unable to get the attribute "user configuration items" under class type. Attached is the screenshot. Kindly Suggest...Configuration Item Types By User_ Filter.GIF