Jeremy D commited on 2011-11-06 19:14:00
Showing 1 changed files, with 12 additions and 9 deletions.
... | ... |
@@ -27,8 +27,10 @@ ini_set('display_errors', 1); |
27 | 27 |
* Should move queries to be executed by a local method to handle errors. |
28 | 28 |
*/ |
29 | 29 |
|
30 |
-// This is my debugging for debugging queries. |
|
31 |
-// exit(var_dump($this->tbg_db->errorInfo())); |
|
30 |
+/* This is my debugging for debugging queries. |
|
31 |
+exit(var_dump($this->tbg_db->errorInfo())); |
|
32 |
+*/ |
|
33 |
+ |
|
32 | 34 |
/* |
33 | 35 |
* @TODO Known Bugs |
34 | 36 |
* Converting categories doesn't sort them properly for which category they existed. |
... | ... |
@@ -838,8 +840,8 @@ class mbt_to_tbg extends tbg_converter |
838 | 840 |
WHEN bt.reproducibility > 70 AND bt.reproducibility < 90 THEN 9 |
839 | 841 |
ELSE 0 |
840 | 842 |
END) AS reproducability, |
841 |
- IFNULL(btt.steps_to_reproduce, "") AS reproduction_steps, |
|
842 |
- IFNULL(btt.description, "") AS description, |
|
843 |
+ btt.steps_to_reproduce AS reproduction_steps, |
|
844 |
+ btt.description AS description, |
|
843 | 845 |
version |
844 | 846 |
FROM ' . $this->mbt_db_prefix . 'bug_table AS bt |
845 | 847 |
LEFT JOIN ' . $this->mbt_db_prefix . 'bug_text_table AS btt ON (btt.id = bt.bug_text_id) |
... | ... |
@@ -849,9 +851,10 @@ class mbt_to_tbg extends tbg_converter |
849 | 851 |
foreach ($this->mantis_db->query($query) as $row) |
850 | 852 |
{ |
851 | 853 |
$this->tbg_db->query(' |
852 |
- REPLACE INTO ' . $this->tbg_db_prefix . 'issues (id, issue_no, project_id, title, posted_by, assigned_to, duplicate_of, posted, last_updated, state, issuetype, category, resolution, priority, severity, reproducability, workflow_step_id, scope) |
|
853 |
- VALUES (' . $row['id'] . ', ' . $row['issue_no'] . ', ' . $row['project_id'] . ', "' . $row['title'] . '", ' . $row['posted_by'] . ', ' . $row['assigned_to'] . ', ' . $row['duplicate_of'] . ', ' . $row['posted'] . ', ' . $row['last_updated'] . ', ' . $row['state'] . ', ' . $row['issuetype'] . ', ' . $row['category'] . ', ' . $row['resolution'] . ', ' . $row['priority'] . ', ' . $row['severity'] . ', ' . $row['reproducability'] . ', 1, 1) |
|
854 |
- '); |
|
854 |
+ REPLACE INTO ' . $this->tbg_db_prefix . 'issues ( |
|
855 |
+ id, issue_no, title, posted, last_updated, project_id, description, state, posted_by, assigned_to, reproduction_steps, resolution, issuetype, priority, category, severity, reproducability, duplicate_of, workflow_step_id, scope) |
|
856 |
+ VALUES ( |
|
857 |
+ ' . $row['id'] . ', ' . $row['issue_no'] . ', "' . $row['title'] . '", ' . $row['posted'] . ', ' . $row['last_updated'] . ', ' . $row['project_id'] . ', "' . $row['description'] . '", ' . $row['state'] . ', ' . $row['posted_by'] . ', ' . $row['assigned_to'] . ', "' . $row['reproduction_steps'] . '", ' . $row['resolution'] . ', ' . $row['issuetype'] . ', ' . $row['priority'] . ', ' . $row['category'] . ', ' . $row['severity'] . ', ' . $row['reproducability'] . ', ' . $row['duplicate_of'] . ', 1, 1)'); |
|
855 | 858 |
|
856 | 859 |
// This attempts to find any versions that got missed, but isn't accurate. |
857 | 860 |
if (!isset($builds[$row['version']])) |
... | ... |
@@ -894,8 +897,8 @@ class mbt_to_tbg extends tbg_converter |
894 | 897 |
foreach ($this->mantis_db->query($query) as $row) |
895 | 898 |
{ |
896 | 899 |
$this->tbg_db->query(' |
897 |
- REPLACE INTO ' . $this->tbg_db_prefix . 'comments (id, target_id, updated, posted, updated_by, posted_by, content) |
|
898 |
- VALUES (' . $row['id'] . ', ' . $row['target_id'] . ', ' . $row['updated'] . ', ' . $row['posted'] . ', ' . $row['updated_by'] . ', ' . $row['posted_by'] . ', "' . $row['content'] . '")'); |
|
900 |
+ REPLACE INTO ' . $this->tbg_db_prefix . 'comments (id, target_id, target_type, content, posted, updated, updated_by, posted_by) |
|
901 |
+ VALUES (' . $row['id'] . ', ' . $row['target_id'] . ', 1, "' . $row['content'] . '", ' . $row['posted'] . ', ' . $row['updated'] . ', ' . $row['updated_by'] . ', ' . $row['posted_by'] . ')'); |
|
899 | 902 |
|
900 | 903 |
++$i; |
901 | 904 |
} |
902 | 905 |