]>
src.bluestatic.org Git - bugdar.git/blob - docs/populate.php
4 include 'includes/api_bug.php';
5 include 'includes/api_comment.php';
7 for ($i = 11; $i < 111; $i++
)
10 $comment = new CommentAPI();
12 $bug->set('userid', bugdar
::$userinfo['userid']);
13 $bug->set('username', bugdar
::$userinfo['displayname']);
14 $bug->set('summary', 'AUTO POPULATE: ' . $i);
15 $bug->set('severity', 1);
17 $comment->set('userid', bugdar
::$userinfo['userid']);
18 $comment->set('comment', BSFunctions
::random(100));
20 $bug->set('priority', bugdar
::$options['defaultpriority']);
21 $bug->set('status', bugdar
::$options['defaultstatus']);
22 $bug->set('resolution', bugdar
::$options['defaultresolve']);
23 $bug->set('assignedto', bugdar
::$options['defaultassign']);
25 $bug->set('product', 6);
26 $bug->set('component', 0);
27 $bug->set('version', 14);
31 $comment->set('bugid', $bug->insertid
);
34 $bug = new BugAPI(); // need to destroy because update will think the insert fields need to be changed, too
35 $bug->dorelations
= array();
36 $bug->set('bugid', $comment->values
['bugid']);
37 $bug->set_condition();
39 $bug->set('dateline', $comment->values
['dateline']);
40 $bug->set('initialreport', $comment->insertid
);
41 $bug->set('lastposttime', $comment->values
['dateline']);
42 $bug->set('lastpostby', bugdar
::$userinfo['userid']);
43 $bug->set('lastpostbyname', bugdar
::$userinfo['displayname']);
44 $bug->set('hiddenlastposttime', $comment->values
['dateline']);
45 $bug->set('hiddenlastpostby', bugdar
::$userinfo['userid']);
46 $bug->set('hiddenlastpostbyname', bugdar
::$userinfo['displayname']);