Post

1 follower Follow
0
Avatar

CZQL to display Followers

Please advise how to best use CZQL to see a list of, say, requests and their followers?  Looking at http://usermanual.clarizen.com/clarizen-fields I tried something like:

 

SELECT CreatedBy, (SELECT DisplayName from Followers) FROM EnhancementRequest

 

but it gave me internal error.

 

Most important: I'd like to get a list of all followers, and not as a sub-query?  Is this possible?

 

Phil Romov Answered

Please sign in to leave a comment.

4 comments

0
Avatar

I was just able to get it to work by using (SELECT Name from DirectFollowers)

 

This is a bit confusing...  Should I always be using DirectFollowers or what's the deal?

 

Thanks,

Phil

Phil Romov 0 votes
Comment actions Permalink
0
Avatar

Some order first:

DirectFollowers - This relation returns the list of users who explicitly followed an item (i.e. the manually clicked the Follow button).

Followes - This relation returns both direct followers and automatic (implicit) followers. Automatic followers are those who follow the item because they have a role on it. i.e. they created the item or they were assigned to that item.

Unfortunately, the Followers relation is not supported in multi result queries. I will make sure we at least issue a proper error message in the future.

Followes is supported for single item (i.e. via the https://api.clarizen.com/V2.0/services/data/RelationQuery API).

 

Eyal Post 0 votes
Comment actions Permalink
0
Avatar

Eyal,

Thanks for the clarification

Is there a way to see all relations which are not supported in multi result queries, or is it just Followers?

Phil Romov 0 votes
Comment actions Permalink
0
Avatar

There are a few other relations not supported but most are supported.
I'll add a CR to have that info available in the metadata API.

Eyal Post 0 votes
Comment actions Permalink