Menu

Cannot assign users to tasks or projects

2013-11-05
2017-12-21
  • Paul Perryman

    Paul Perryman - 2013-11-05

    This is a great looking tool (1.5.3. on win7 32-bit) and it appears to be working correctly accept I cannot add users to tasks or projects. Users appear in the Assignments window when editing projects or tasks. I can select and highlight the users but after hitting update the user changes are not accepted. 'None" always shows under "Assigned persons".

    Any suggestions?

     
  • Maxim Larivière

    I got the same problem here.
    I can put a project manager when editing a project but I cannot assign any users to a project or a task (I see them on a list but can't do anything with it).

    Thank you

     
  • tommo

    tommo - 2014-03-16

    The project assignments don't have any effect, as far as I know, just the task assignments.

    If it is not a client issue, I will take a look at it.

     
  • Tim Styles

    Tim Styles - 2014-07-16

    I see the same issue with projects and tasks in version 1.5.3.
    Comparing the source with 1.5.2 I found that Assignments can be made if the following line is removed from proj_action.php and task_action.php:

    array_walk($assigned, mysql_real_escape_string);

    Line 19 in proj_action.php
    Line 24 in task_action.php

     
  • hence321

    hence321 - 2015-03-25

    hi, any comment of the developer on this? why this fix work?
    thank you

     
  • Julian Clarke

    Julian Clarke - 2017-11-20

    From what I've read, the issue is that array_walk passes the array value and key as parameters to the callback function, but mysql_real_escape_string expects a db link (or optionally nothing) as the second parameter. Instead of returing the array escaped for MySQL, it returns an error due to the unrecognized parameter. I'm still scratching my head to figure out why that line ever worked in the first place.

    The function, array_map can be used instead of array_walk. just replace the line:
    array_walk($assigned, mysql_real_escape_string);
    with:
    $assigned = array_map(mysql_real_escape_string, $assigned);
    here, (as stated by Tim Styles)):
    Line 19 in proj_action.php
    Line 24 in task_action.php

     
  • tommo

    tommo - 2017-12-21

    Looking at the svn history, I am not sure this was ever tested before being committed. It was just a patch that was suggested, so there is a chance that it has never worked.
    Cheers

     

Log in to post a comment.