In the teams there are person, which are disabled.
I think there should only persons added, which are active (node status of person != 0) in the team array.
Patch follows.

Comments

kfritsche’s picture

Status: Active » Needs review
StatusFileSize
new577 bytes

Here the patch.

juliangb’s picture

Category: bug » task

(I think this is a change rather than a bug.)

I'm not sure about this filtering on the node_load. We can then get to a situation where there is "garbage" (old persons) in teams that are just hidden and not properly removed.

Do we currently allow adding disabled persons to teams?

I think perhaps we should not allow adding disabled persons to teams, but then if the person is in the team, leave them in until removed.

kfritsche’s picture

StatusFileSize
new2.81 KB

You are right.

Here another patch. It disables that you can add disabled person to teams. Also it adds a 2nd member array for deactivated people, but they are still in the normal member array to.
This is used for the assigned Select Box, to easily remove deactivated Persons. Because it shouldn't be able to assign a node to a no longer existing person.
In the view of the team node, to all deactivated people names, there will be added an notice that this people are no longer available.

What do you think of this approach?
This doesn't change the member_array, so we do not get problems anywhere, because of missing persons.
But you can't add these people to teams and more important, can't assign tickets to this persons.

juliangb’s picture

Have spent a while reading through the changes - and am broadly in line with them.

One minor point....

+++ b/storm.module
@@ -988,7 +988,9 @@ function storm_get_assignment_options($organization_nid = 0, $project_nid = 0) {
+              if (!array_key_exists($nid, $node->members_deactived_array)) {

I think deactived would read better as deactivated?

kfritsche’s picture

StatusFileSize
new2.82 KB

I should add a spell checker :)
New Patch.
Fixed spelling error (deactived to deactivated)

juliangb’s picture

#5: only_active_person-1318432-5.patch queued for re-testing.

juliangb’s picture

Status: Needs review » Fixed

Committed to 2.x. Thanks!

Status: Fixed » Closed (fixed)

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