If anyone else was interested, I figured this out.  Still hard to
understand what's going on behind the scenes, but this works:

SELECT id AS ticket, a.summary AS Summary, a.priority AS Priority,
a.status AS Status, a.owner AS Owner
FROM ticket a
    WHERE
a.status <> 'closed'
and type='task'
and a.id NOT IN(SELECT ticket FROM ticket_custom WHERE name =
"drp_resources")
    ORDER BY priority, time



On Jun 29, 11:09 am, Matt <[email protected]> wrote:
> Hello.
>
> I'm trying to write a custom query that will return all Tasks that are
> not Referenced By a User Story.  I can't seem to get this to work
> because I don't understand how Agilo makes this reference between
> tickets.  Does anyone know how to do this?
>
> This is what I'm going for:
>
> SELECT id AS ticket, summary, type, status, severity, priority,
> owner,
>        time as created
> FROM ticket
>     WHERE status <> 'closed'
> and type='task'
> and XXXXXXXXXXXXXXXXXX
>     ORDER BY priority, time
>
> Where XXXXXXXXXX is a statement that will allow me to join into
> whatever the reference table is that connects tickets in the
> Referenced By/References relationship so that I can exclude any Tasks
> that are referenced by a User Story.
>
> I can write the query a few different ways, however I need to know the
> name of the tables and fields.  Trac provides a data schema, but I
> can't find one for 
> Agilo.http://trac.edgewall.org/attachment/wiki/TracDev/DatabaseSchema/trac-...
>
> thanks,
> m.

-- 
Follow Agilo on Twitter: http://twitter.com/agiloforscrum
Please support us by reviewing and voting on: 
http://userstories.com/products/8-agilo-for-scrum 
http://ohloh.net/p/agilo-scrum 
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Scrum" Google Group. This group is focused on
supporting Agilo for Scrum users and is moderated by
Agilo Software GmbH <http://www.agiloforscrum.com>.

To post to this group, send email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/agilo

Reply via email to