Topic
  • 2 replies
  • Latest Post - ‏2012-02-14T17:36:35Z by SystemAdmin
SystemAdmin
SystemAdmin
174 Posts

Pinned topic Creating custom query help

‏2012-02-13T18:17:23Z |
I need to create a query that will show all baselines that have active releases within the last 60 days. I have looked around the help menus but I am at a loss as to how to do this. Any help would be greatly appreciated.
Updated on 2012-02-14T17:36:35Z at 2012-02-14T17:36:35Z by SystemAdmin
  • David.Honey
    David.Honey
    176 Posts

    Re: Creating custom query help

    ‏2012-02-14T11:06:59Z  
    There is no way to do this through a single query. This is because the association between a baseline's release and the release definition object associated with that release is implicit through the value of the release attribute.

    You could write a script to do this. For example, you could query for all baselines created within the last 60 days, and include the baseline's release in the output. Then for each returned result, use the ccm release -show active command to determine whether the corresponding release is active or not, ignoring a baseline result where the release is not active. You might also use ccm select -remove command to remove baselines from the query selection set for which the associated release is not active.

    Best regards,
    David.
  • SystemAdmin
    SystemAdmin
    174 Posts

    Re: Creating custom query help

    ‏2012-02-14T17:36:35Z  
    There is no way to do this through a single query. This is because the association between a baseline's release and the release definition object associated with that release is implicit through the value of the release attribute.

    You could write a script to do this. For example, you could query for all baselines created within the last 60 days, and include the baseline's release in the output. Then for each returned result, use the ccm release -show active command to determine whether the corresponding release is active or not, ignoring a baseline result where the release is not active. You might also use ccm select -remove command to remove baselines from the query selection set for which the associated release is not active.

    Best regards,
    David.
    Thanks for the suggestion, I'll give it a try today.