PDA

View Full Version : suggestion : thread to issue !!!


baghdad4ever
05 May 2010, 11:36
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

King Kovifor
05 May 2010, 14:14
This suggestion will be placed in our tracker. :)

cloferba
06 May 2010, 17:36
yes! very important =)

PitchouneN64ngc
10 May 2010, 11:19
I already adapted it to vB4 for my needs, it could be easy to integrate it as default feature.

cevou
18 May 2010, 11:27
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.

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

baghdad4ever
19 May 2010, 11:39
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

cevou
27 May 2010, 17:41
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);
}

?>

PitchouneN64ngc
27 May 2010, 18:33
Added into 2.1.1.

baghdad4ever
27 May 2010, 19:13
Added into 2.1.1.

thank you very much