loduis / teamwork.com-project-management

PHP API for Teamwork.com
https://developer.teamwork.com/
MIT License
70 stars 59 forks source link

Some problem with character "," #6

Closed MixMe closed 11 years ago

MixMe commented 11 years ago

$task_id = $this->task_obj->save(array( 'task_list_id' => $tasklist_ID, 'content' => text,text, ));

after this try to get all tasklist: $tasklist_obj = TeamWorkPm::factory('task/list'); tasklist_obj->getByProject(10); Result will be NULL

Only when "," character exist in "content"- field

loduis commented 11 years ago
<?php

require './TeamWorkPm.php';

// START configurtion
const API_COMPANY = 'phpapi2';
const API_KEY = 'horse48street';

try {
    // set your keys
    TeamWorkPm::setAuth(API_COMPANY, API_KEY);
    $project_id = 32930;
    // create one task list
    $taskList = TeamWorkPm::factory('task/list');
    $task_list_id = $taskList->save(array(
        'project_id'  => $project_id,
        'name'        => 'My first task list',
        'description' => 'Bla, Bla,'
    ));
    $task = TeamWorkPm::factory('task');
    $task->save(array(
        'task_list_id' => $task_list_id,
        'content' => 'text,text,'
    ));
    $taskList = TeamWorkPm::factory('task/list');
    foreach ($taskList->getByProject($project_id) as $list) {
        print_r($list);
    }
} catch (Exception $e) {
    print_r($e);
}

This is my test script and no see the problem. You can adjust this script to reproduce the problem