We've been using Case tracker at our local workplace.intranet. It has worked great until now. I recently upgraded frrom Casetracker 6x-10-beta1 to beta4. We have created multiple projects with cases and assigned these to different users. After installing beta4 I'm not getting the correct assigned_to user when using filters created by views. For example a case assigned to userA shows up nicely with userA as assigned_to in the fields column, BUT when trying to filter for userA I end up with the assigend_to cases for UserB. This i VERY frustrating atm. Can you please look into this?
- Helge

Comments

jmiccolis’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using the default views provided by casetracker, or have you build your own?

If you are using your own can you attach the exported definition of one?

hgrindba’s picture

Hi! Thx for answering. I'm using the casetracker_project_cases view as template, which I've attached som modified views. Look at the view named raditoppgaveliste. When choosing the name of the assigned user i get another users cases. The only choices that work correctly is 'any user' and 'current user'.

Azol’s picture

I have similar issue, but that's what I have done:
I added a custom CCK data field "Due date" to case node then I made a new view "Outdated cases" with corresponding filters. The fun thing is ALL the cases display "Guest" as assigned user. I think these problems may be related to each other - wrong assigned user display in views with custom filters.

scottrigby’s picture

Status: Postponed (maintainer needs more info) » Active

The same issue happens with Open Atrium installation of Casetraker (6.x-1.0-beta4) - on OA's site as well.

Here's the issue, which provides more specific information -- and to cross-reference:
https://community.openatrium.com/issues/node/833#comment-2033

msonnabaum’s picture

Component: User interface » Code
Status: Active » Needs review
StatusFileSize
new860 bytes

Looks like this is happening in casetracker_user_options().

The first bit that gets the list of users from the view returns an array of users keyed by their UID. Those keys don't get preserved however in the array_slice() that's used to add the anonymous user to the array.

Changing it from:

array_splice($options, 0, 0, array($anon_user));

to:

$options = array($anon_user) + $options;

seems to accomplish the same goal while preserving keys.

Making that change fixes the views filter for me.

Patch attached.

scottrigby’s picture

Status: Needs review » Reviewed & tested by the community

works here too -- this would be great to commit for the next release of OA as well

sanduhrs’s picture

Can confirm the patch in #5 is working as advertised && RTBC!

jmiccolis’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and reviews. Committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.