• Resolved awijasa

    (@awijasa)


    Hello,

    A Task’s Assigned To value may be empty.

    In /includes/frontend/up-table-functions.php, here is the logic that exclude tasks that are not assigned to the current user:

    
    // Check if $item should be skipped if we want to filter data by the current logged in user.
            if( $filterRowsetByCurrentUser &&
                (
                    isset($item['assigned_to']) &&
                    $currentUserId > 0 &&
                    (int)$item['assigned_to'] !== $currentUserId
                )
            ) {
                continue;
            }
    

    To take tasks with empty Assigned To field into account, I think it should be modified to:

    
    // Check if $item should be skipped if we want to filter data by the current logged in user.
            if( $filterRowsetByCurrentUser &&
                (
                    empty( $item['assigned_to'] ) || // Added on 8/12/2017 3:03 PM by Adrian Wijasa. Previously: isset($item['assigned_to']) &&
                    $currentUserId > 0 &&
                    (int)$item['assigned_to'] !== $currentUserId
                )
            ) {
                continue;
            }
    

    Thanks,

    @awijasa

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tasks with no Assigned To value may appear under Tasks assigned to me’ is closed to new replies.