Multiple filter criteria
I am trying to run a report and would like to bring back pages based on multiple criteria. Each project page allows a Project Manager, a Lead Analyst, a Tech Lead and a Release Consultant to be set (using {list-data}{user-options}{list-data}.
I would like to bring back all pages where the logged in person is defined as any of these roles.
The following works to test against a single field (ProjectManager), but I'm not sure how to say If ProjectManaer or LeadAnalyst or TechLead or ReleaseConsultant = @self?
I tried playing with the collection-filter, but couldn't get that to help me (using matchFilters=any).
Can this be done?
Thanks
I would like to bring back all pages where the logged in person is defined as any of these roles.
The following works to test against a single field (ProjectManager), but I'm not sure how to say If ProjectManaer or LeadAnalyst or TechLead or ReleaseConsultant = @self?
{card:label=My Projects}
{report-block}
{combining-reporter}
{content-reporter:type=page|scope=@self>descendants}
{user-reporter:type=page|scope=@self>descendants}
{text-sort:content:title|order=ascending}
{text-filter:content:title|include=.*Summary.*}
{user-filter:data:projectManager > reference:value |users=@self}
{combining-reporter}
{report-body}
{replace-and-render}
{replace-body}
{div:style=margin-bottom:8px;}{lozenge:title=%title%|color=%colour%|link=%link%|arrow=none|icon=%projectcode%}{span:style=font-size:8pt}Project Manager: *{report-info:data:projectManager}* \\ Estimated Go Live: *{report-info:data:estimatedGoLive|format=dd MMM yyyy}* {span}{lozenge}{div}
{replace-body}
{replace-item:%link%}{report-info:content:parent > content:title}{replace-item}
{replace-item:%title%}{report-info:data:title|link=true}{replace-item}
{replace-item:%projectcode%}{report-info:data:project|link=true}{replace-item}
{replace-item:%colour%}{report-info:data:status > reference:value > text:lower case}{replace-item}
{replace-and-render}
{report-body}
{report-block}
{card}
I tried playing with the collection-filter, but couldn't get that to help me (using matchFilters=any).
Can this be done?
Thanks
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The best answer from the company
-
Ok...
The {user-reporter} isn't actually returning any results currently, so it can go. I would also suggest switching your {content-reporter} for a {local-reporter} - it should be more efficient.
I also swapped out using the {replace-and-render} macro for 'injected=true', but either should work, although the 'link=true' values don't do anything in this case either.
Technically, you don't need the {combining-reporter} in this case because there is just one sub-report. But, we're going to use it here anyway to solve youre 'X or Y or Z' problem. Because you have the extra 'text-filter', we need another way to provide an 'or' situation. So, we'll fudge it with a combining-reporter. What we really need is an 'or-filter' or something similar to group a sub-set of 'or' options.
Anyway, try something like the following:
{report-block}
{combining-reporter:matchAll=false}
{local-reporter:page:descendants}
{text-sort:content:title|order=ascending}
{text-filter:content:title|include=.*Summary.*}
{local-reporter}
{user-filter:data:projectManager > reference:value|users=@self}
{user-filter:data:leadAnalyst > reference:value|users=@self}
{user-filter:data:techLead > reference:value|users=@self}
{user-filter:data:releaseConsultant > reference:value|users=@self}
{combining-reporter}
{report-body:injected=true}
{div:style=margin-bottom:8px;}{lozenge:title=%data:title%|color=%data:status > reference:value > text:lower case%|link=%content:parent > content:title%|arrow=none|icon=%data:project%}{span:style=font-size:8pt}Project Manager: *{report-info:data:projectManager}* \\ Estimated Go Live: *{report-info:data:estimatedGoLive|format=dd MMM yyyy}* {span}{lozenge}{div}
{report-body}
{report-block}
Adjust to taste...
The company and 2 other people say
this answers the question
-
Inappropriate?Ok...
The {user-reporter} isn't actually returning any results currently, so it can go. I would also suggest switching your {content-reporter} for a {local-reporter} - it should be more efficient.
I also swapped out using the {replace-and-render} macro for 'injected=true', but either should work, although the 'link=true' values don't do anything in this case either.
Technically, you don't need the {combining-reporter} in this case because there is just one sub-report. But, we're going to use it here anyway to solve youre 'X or Y or Z' problem. Because you have the extra 'text-filter', we need another way to provide an 'or' situation. So, we'll fudge it with a combining-reporter. What we really need is an 'or-filter' or something similar to group a sub-set of 'or' options.
Anyway, try something like the following:
{report-block}
{combining-reporter:matchAll=false}
{local-reporter:page:descendants}
{text-sort:content:title|order=ascending}
{text-filter:content:title|include=.*Summary.*}
{local-reporter}
{user-filter:data:projectManager > reference:value|users=@self}
{user-filter:data:leadAnalyst > reference:value|users=@self}
{user-filter:data:techLead > reference:value|users=@self}
{user-filter:data:releaseConsultant > reference:value|users=@self}
{combining-reporter}
{report-body:injected=true}
{div:style=margin-bottom:8px;}{lozenge:title=%data:title%|color=%data:status > reference:value > text:lower case%|link=%content:parent > content:title%|arrow=none|icon=%data:project%}{span:style=font-size:8pt}Project Manager: *{report-info:data:projectManager}* \\ Estimated Go Live: *{report-info:data:estimatedGoLive|format=dd MMM yyyy}* {span}{lozenge}{div}
{report-body}
{report-block}
Adjust to taste...
The company and 2 other people say
this answers the question
-
I need to add to the text-filter an OR operator in the following report, i.e. I would like to show parent pages which contain in the “Protokol” filed HTTP or RMI
{report-table}
{local-reporter:content:parent|type=page}
{text-filter:data:Protokol|include=.*HTTP.*}{text-filter}
{local-reporter}
{report-column:title=Summary}
{report-info:content:title|link=true}
{report-column}
{report-table}
I have tried with something like that but without success, in result I get also pages which do not fulfill the condition.
{report-table}
{local-reporter:content:parent|type=page}
{text-filter:data:Protokol| > reference:value > text:starts with HTTP}{text-filter}
{text-filter:data:Protokol| > reference:value > text:starts with RMI}{text-filter}
{local-reporter}
{report-column:title=Summary}
{report-info:content:title|link=true}
{report-column}
{report-table} -
I'm assuming Protokol is a {list-data} field. That being the case, try this for your filter:
{text-filter:data:Protokol > reference:value|include=HTTP\|RMI}
-
This comment was removed on 06/25/09.
see the change log -
Yes, it is the {list-data} which to be accurate looks like
{list-option}HTTP (WS){list-option}
{list-option}TUXEDO{list-option}
{list-option}JMS{list-option}
{list-option}RMI (EJB){list-option}
{list-option}LOCAL{list-option}
So for I have tried the following but it does not work, only the first item is found, the second after pipe is not found.
{text-filter:data:Protokol > reference:value|include=.*RMI.*\|.*HTTP.*}
I have tried also but without success
{text-filter:data:Protokol > reference:value|include=.*RMI.*|.*HTTP.*} -
Pipes are a bit tricky, since they are used by confluence to indicate you're starting a new parameter. Some plugins have a workaround,but apparently not this one. Try using a ',' instead in this case. Eg:
{text-filter:data:Protokol > reference:value|include=.*RMI.*,.*HTTP.*}
Loading Profile...



EMPLOYEE