Helpful Information
 
 
Category: vBulletin Open Source Products
suggestion : thread to issue !!!

hi

i suggest to add this option to the thread tool by which we can transform any thread from forum to issue in the pt

like this

http://www.vbulletin.org/forum/attachment.php?attachmentid=66823&d=1184144362

thanks

This suggestion will be placed in our tracker. :)

yes! very important =)

I already adapted it to vB4 for my needs, it could be easy to integrate it as default feature.

Is it possible to convert a thread into an issue?
I used a forum for my bugs before and want to use project tools now.

This feature is not implemented actually, and could be added in a later release. We need to discuss about suggested features between devs :)

This feature is not implemented actually, and could be added in a later release. We need to discuss about suggested features between devs :)

i think it is very usefull and someone make it but for 3.8

i hope to see it implemented in 2.1.1

thanks

Until it's implemented I wrote a code snippet, that copies threads into project tools.

<?php

//MySQL Server-Data
$server = "localhost";
$db = "db";
$user = "user";
$pass = "pass";

$fromforum = 19;
$saveastype = "bug";
$projectid = 1;

//Create connection and connect
$conn = mysql_connect($server,$user,$pass);

//Select database
mysql_select_db($db,$conn);

$res = mysql_query("SELECT * FROM thread WHERE forumid=".$fromforum);

while ($r = mysql_fetch_array($res)) {
mysql_query("INSERT INTO pt_issue (projectid,issuetypeid,title,submituserid,submitusername,submitdate)
VALUES (".$projectid.",'".$saveastype."','".$r['title']."','".$r['postuserid']."','".$r['postusername']."','".$r['dateline']."')");
$res2 = mysql_query("SELECT * FROM post WHERE threadid=".$r['threadid']." ORDER BY dateline");
$issueid = mysql_insert_id();
while ($r2 = mysql_fetch_array($res2)) {
mysql_query("INSERT INTO pt_issuenote (issueid,dateline,pagetext,userid,username)
VALUES ('".$issueid."','".$r2['dateline']."','".$r2['pagetext']."','".$r2['userid']."','".$r2['username']."')");
}
mysql_query("UPDATE pt_issue SET lastpost='".$r2['dateline']."', lastactivity='".$r2['dateline']."', lastpostuserid='".$r2['userid']."', lastpostusername='".$r2['username']."' WHERE issueid=".$issueid);
}

?>

Added into 2.1.1.

Added into 2.1.1.

thank you very much










privacy (GDPR)