diff --git a/module/bug/control.php b/module/bug/control.php
index fc49d1c0c3..3108266b17 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -291,13 +291,14 @@ class bug extends control
{
$bug = $this->bug->getById($bugID);
extract((array)$bug);
- $projectID = $bug->project;
- $moduleID = $bug->module;
- $taskID = $bug->task;
- $storyID = $bug->story;
- $buildID = $bug->openedBuild;
- $severity = $bug->severity;
- $type = $bug->type;
+ $projectID = $bug->project;
+ $moduleID = $bug->module;
+ $taskID = $bug->task;
+ $storyID = $bug->story;
+ $buildID = $bug->openedBuild;
+ $severity = $bug->severity;
+ $type = $bug->type;
+ $assignedTo = $bug->assignedTo;
}
/* If projectID is setted, get builds and stories of this project. */
diff --git a/module/bug/js/common.js b/module/bug/js/common.js
index 2afc67a67e..2f9f7ed420 100644
--- a/module/bug/js/common.js
+++ b/module/bug/js/common.js
@@ -5,13 +5,15 @@ $(function()
if(typeof page == 'undefined') page = '';
if(page == 'create')
{
- productID = $('#product').val();
+ productID = $('#product').val();
+ moduleID = $('#module').val();
+ assignedto = $('#assignedTo').val();
changeProductConfirmed = true;
oldStoryID = 0;
oldProjectID = 0;
oldOpenedBuild = '';
oldTaskID = 0;
- setAssignedTo(0,productID);
+ if(!assignedto)setAssignedTo(moduleID, productID);
notice();
}
@@ -202,7 +204,7 @@ function setStories(moduleID, productID)
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&moduleID=' + moduleID);
$.get(link, function(stories)
{
- if(!stories) stories = '';
+ if(!stories) stories = '';
$('#story').replaceWith(stories);
$('#story_chzn').remove();
$("#story").chosen({no_results_text: ''});
diff --git a/module/story/control.php b/module/story/control.php
index ac7e221813..4004ab6b7d 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -805,7 +805,7 @@ class story extends control
$moduleID = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProductStoryPairs($productID, $moduleID);
- $select = html::select('story', $stories, $storyID, "class=''");
+ $select = html::select('story', $stories, $storyID, "class='select-3'");
/* If only need options, remove select wrap. */
if($onlyOption == 'true') die(substr($select, strpos($select, '>') + 1, -10));
diff --git a/www/js/my.full.js b/www/js/my.full.js
index ad51479e41..2197398739 100644
--- a/www/js/my.full.js
+++ b/www/js/my.full.js
@@ -842,10 +842,14 @@ function setModal4List(colorboxClass, replaceID, callback)
$('#tmpDiv').replaceWith($('#tmpDiv').html());
setModal4List(colorboxClass, replaceID, callback);
- $('.colored').colorize();
+ try{$('.colored').colorize();}catch(err){}
$('tfoot td').css('background', 'white').unbind('click').unbind('hover');
- $(".date").datePicker({createButton:true, startDate:startDate})
- .dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
+ try
+ {
+ $(".date").datePicker({createButton:true, startDate:startDate})
+ .dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
+ }
+ catch(err){}
if(typeof(callback) == 'function') callback();
$.cookie('selfClose', 0);
});