Constituencies and search results/home page

Hello all,
I’m running RT 3.8.9 with RTIR 2.6. I just started using constituencies, and am seeing some odd behavior. Not sure if its a known issue, or if I might have just messed something up…

I have 2 constituencies. Assume that there are 12 reports in ‘constituency A’, and 14 reports in ‘constituency B’. If I am logged in as a member of ‘dutyteam constituency A’, the ‘new unlinked incident reports’ section displays only reports from the correct constituency, but it seems like they are filtered AFTER the query is run (number of results/pages corresponds to the total number of reports in all constituencies).

Not a big deal, but lets say that ‘constituency A’ has 6 reports, then ‘constituency B’ gets 14, and ‘constituency A’ gets 6 more. In this situation, a user in ‘dutyteam constituency A’ only sees 6 reports on the home page (instead of 10), and has to go to the next page to see more. However, page 2 is totally empty, and we find the other 6 reports on page 3 (as if all the reports were visible).

Refining the search to specify constituency works as expected, but I’d like to eliminate as many steps as possible.

Anyone have any helpful tips?

Thanks!

Chris

Pls. unsubscribe. Thank you.On Sep 19, 2012, at 12:33 PM, Chris Warren chris.warren@netelligent.ca wrote:

Hello all,
I’m running RT 3.8.9 with RTIR 2.6. I just started using constituencies, and am seeing some odd behavior. Not sure if its a known issue, or if I might have just messed something up…

I have 2 constituencies. Assume that there are 12 reports in ‘constituency A’, and 14 reports in ‘constituency B’. If I am logged in as a member of ‘dutyteam constituency A’, the ‘new unlinked incident reports’ section displays only reports from the correct constituency, but it seems like they are filtered AFTER the query is run (number of results/pages corresponds to the total number of reports in all constituencies).

Not a big deal, but lets say that ‘constituency A’ has 6 reports, then ‘constituency B’ gets 14, and ‘constituency A’ gets 6 more. In this situation, a user in ‘dutyteam constituency A’ only sees 6 reports on the home page (instead of 10), and has to go to the next page to see more. However, page 2 is totally empty, and we find the other 6 reports on page 3 (as if all the reports were visible).

Refining the search to specify constituency works as expected, but I’d like to eliminate as many steps as possible.

Anyone have any helpful tips?

Thanks!

Chris


Rtir mailing list
Rtir@lists.bestpractical.com
The rtir Archives

I’ve been playing around with this all day, and came up with the following which seems to work:

In html/RTIR/Elements/BaseQuery, changed:

<%INIT>
return ‘’ unless $Queue;
return “Queue = ‘$Queue’”;
</%INIT>
<%ARGS>
$Queue => ‘’
</%ARGS>

to:

<%INIT>
my $GroupObj = RT::Group->new( $session{ ‘CurrentUser’ } );
my $PrincipalObj = RT::Principal->new( $session{ ‘CurrentUser’ } );
$PrincipalObj->Load( $session{ ‘CurrentUser’ }->id );
$GroupObj->LoadUserDefinedGroup( ‘DutyTeam A’ );
my $HasMember = $GroupObj->HasMemberRecursively( $PrincipalObj );
return “Queue = ‘$Queue’ AND ‘CF.{Constituency}’ = ‘A’” if $HasMember;
$GroupObj->LoadUserDefinedGroup( ‘DutyTeam B’ );
$HasMember = $GroupObj->HasMemberRecursively( $PrincipalObj );
return “Queue = ‘$Queue’ AND ‘CF.{Constituency}’ = ‘B’” if $HasMember;
return ‘’ unless $Queue;
return “Queue = ‘$Queue’”;
</%INIT>
<%ARGS>
$Queue => ‘’
</%ARGS>----- Original Message -----
From: “Chris Warren” chris.warren@netelligent.ca
To: rtir@lists.bestpractical.com
Sent: Wednesday, September 19, 2012 12:33:53 PM
Subject: [Rtir] Constituencies and search results/home page

Hello all,
I’m running RT 3.8.9 with RTIR 2.6. I just started using constituencies, and am seeing some odd behavior. Not sure if its a known issue, or if I might have just messed something up…

I have 2 constituencies. Assume that there are 12 reports in ‘constituency A’, and 14 reports in ‘constituency B’. If I am logged in as a member of ‘dutyteam constituency A’, the ‘new unlinked incident reports’ section displays only reports from the correct constituency, but it seems like they are filtered AFTER the query is run (number of results/pages corresponds to the total number of reports in all constituencies).

Not a big deal, but lets say that ‘constituency A’ has 6 reports, then ‘constituency B’ gets 14, and ‘constituency A’ gets 6 more. In this situation, a user in ‘dutyteam constituency A’ only sees 6 reports on the home page (instead of 10), and has to go to the next page to see more. However, page 2 is totally empty, and we find the other 6 reports on page 3 (as if all the reports were visible).

Refining the search to specify constituency works as expected, but I’d like to eliminate as many steps as possible.

Anyone have any helpful tips?

Thanks!

Chris

Rtir mailing list
Rtir@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rtir

I’m running RT 3.8.9 with RTIR 2.6. I just started using constituencies, and am seeing some odd behavior. Not sure if its a known issue, or if I might have just messed something up…

I suggest checking out UseSQLForACLChecks (and the possible bugs it
can fix and cause) in RT_Config.pm and seeing if that helps. Unfortunately,
Constituencies may not be able to fully take advantage of it because
of the CF usage. Your solution to add on a constituency dynamically
may be the right path to pursue.

-kevin

Thanks Kevin. I tried that setting but could not get any reports to display. I guess it probably doesn’t work with constituencies.
The ugly solution I came up with seems to work well enough for now.From: “Kevin Falcone” falcone@bestpractical.com
To: rtir@lists.bestpractical.com
Sent: Thursday, September 20, 2012 6:48:21 PM
Subject: Re: [Rtir] Constituencies and search results/home page

I’m running RT 3.8.9 with RTIR 2.6. I just started using constituencies, and am seeing some odd behavior. Not sure if its a known issue, or if I might have just messed something up…

I suggest checking out UseSQLForACLChecks (and the possible bugs it
can fix and cause) in RT_Config.pm and seeing if that helps. Unfortunately,
Constituencies may not be able to fully take advantage of it because
of the CF usage. Your solution to add on a constituency dynamically
may be the right path to pursue.

-kevin

I have 2 constituencies. Assume that there are 12 reports in ‘constituency A’, and 14 reports in ‘constituency B’. If I am logged in as a member of ‘dutyteam constituency A’, the ‘new unlinked incident reports’ section displays only reports from the correct constituency, but it seems like they are filtered AFTER the query is run (number of results/pages corresponds to the total number of reports in all constituencies).

Not a big deal, but lets say that ‘constituency A’ has 6 reports, then ‘constituency B’ gets 14, and ‘constituency A’ gets 6 more. In this situation, a user in ‘dutyteam constituency A’ only sees 6 reports on the home page (instead of 10), and has to go to the next page to see more. However, page 2 is totally empty, and we find the other 6 reports on page 3 (as if all the reports were visible).

Refining the search to specify constituency works as expected, but I’d like to eliminate as many steps as possible.

Anyone have any helpful tips?
Rtir mailing list
Rtir@lists.bestpractical.com
The rtir Archives