4 Replies Latest reply on Oct 28, 2009 1:04 AM by aparker

    Change / Task Query


      We have a list of Changes sitting at "Review" status - currently, we return all of these in a workload list.


      Most of these Changes will have al least one Task off it.


      I have written a Query that selects Changes where "Tasks.Status Is Equal to (Completed) AND Status Is Equal to (Review)"


      This works nicely as long as Changes only have a single Task.

      If a Change has more than one, it will be returned on this Query as long as ANY of the Tasks are complete.


      Is there any way to only return Changes where ALL the Tasks are complete ?


      Also, some Changes have no tasks - can I amend my query to include these ?

        • 1. Re: Change / Task Query
          Julian Wigman ITSMMVPGroup

          I wonder whether you could have a calculated boolean attribute on Change that shows as TRUE if All tasks are in "Completed" Status.  You test on this boolean in your QT query.


          Then in the calculation itself do all of the hard work and the return value is the boolean value.


          (1) Set return value to FALSE

          (2) Find "total" number of Tasks on the change and store in variable

          (3) Loop round all tasks on that change and "subtotal" if they are in status "Completed"

          (4) compare "subtotal" with "total" and if equal then return "TRUE", else "FALSE"


          Maybe those more advanced on the BOO editor can advise.


          Just an approach that occurs to me.





          • 2. Re: Change / Task Query
            Julian Wigman ITSMMVPGroup

            Of course forgot to say you'd need to be on 7.3

            • 3. Re: Change / Task Query

              Yeah, we're only on 7.2.5 and unlikely to upgrade in the immediate future, otherwise your suggestion sounded great

              • 4. Re: Change / Task Query
                aparker Employee

                Hi David,


                I don't think there is way just using the Query Designer that we can solve that for you. The only way that I can see this being cracked in 7.2.5 would be to have an automatic step in the process that detects when all Tasks are completed (All Tasks At End State?) and then moves the process on to a new status that reflects that. You can then write the query on the new status. I appreciate that is the a process based solution to a query question, but without the luxury of the new calculation tool in 7.3 (Julian's suggestion is pretty much spot on.), I think it's the most robust answer.



                1 of 1 people found this helpful