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/build/model.php b/module/build/model.php
index 7d9c052707..8d1e2ccd85 100644
--- a/module/build/model.php
+++ b/module/build/model.php
@@ -135,10 +135,10 @@ class buildModel extends model
$build->bugs = '';
$build = fixer::input('post')->stripTags('name')
+ ->setDefault('product', 0)
->join('stories', ',')
->join('bugs', ',')
- ->remove('allchecker')
- ->add('project', (int)$projectID)->remove('resolvedBy')->get();
+ ->add('project', (int)$projectID)->remove('resolvedBy,allchecker')->get();
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name', 'unique', "product = {$build->product}")->exec();
if(!dao::isError())
{
diff --git a/module/common/model.php b/module/common/model.php
index df6c9004e1..e7dd0d9e4c 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -146,6 +146,7 @@ class commonModel extends model
{
if($module == 'user' and strpos('login|logout|deny', $method) !== false) return true;
if($module == 'api' and $method == 'getsessionid') return true;
+ if($module == 'misc' and $method == 'ping') return true;
if($module == 'sso' and strpos('auth|depts|users', $method) !== false) return true;
if($this->loadModel('user')->isLogon())
diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php
index a3f550c5c4..e3b1d608da 100755
--- a/module/common/view/header.lite.html.php
+++ b/module/common/view/header.lite.html.php
@@ -27,6 +27,10 @@ $clientTheme = $this->app->getClientTheme();
css::import($defaultTheme . 'yui.css', $config->version);
css::import($defaultTheme . 'style.css', $config->version);
+ echo '';
+
css::import($langTheme, $config->version);
if(strpos($clientTheme, 'default') === false) css::import($clientTheme . 'style.css', $config->version);
}
diff --git a/module/file/view/export.html.php b/module/file/view/export.html.php
index 3be6777a6f..cd6c7f42b1 100644
--- a/module/file/view/export.html.php
+++ b/module/file/view/export.html.php
@@ -54,7 +54,6 @@ function switchEncode(fileType)
echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value)');
echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "" : "class='hidden'");
echo html::select('exportType', $lang->exportTypeList, ($this->cookie->checkedItem) ? 'selected' : 'all');
- echo "
";
echo html::submitButton();
?>
diff --git a/module/project/model.php b/module/project/model.php
index 1593156b37..2cf36d0c9b 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -1496,24 +1496,25 @@ class projectModel extends model
*/
public function getDateList($begin, $end, $type)
{
+ $begin = strtotime($begin);
+ $end = strtotime($end);
$dateList = array();
$date = $begin;
while($date <= $end)
{
- $timestamp = strtotime($date);
-
+ /* Remove weekend when type is noweekend.*/
if($type == 'noweekend')
{
- $weekDay = date('w', $timestamp);
+ $weekDay = date('w', $date);
if($weekDay == 6 or $weekDay == 0)
{
- $date = date('Y-m-d', $timestamp + 24 * 3600);
+ $date += 24 * 3600;
continue;
}
}
- $dateList[] = $date;
- $date = date('Y-m-d', $timestamp + 24 * 3600);
+ $dateList[] = date('m/d/Y', $date);
+ $date += 24 * 3600;
}
return $dateList;
diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php
index 15df1f7aa2..10d97f6f71 100644
--- a/module/project/view/story.html.php
+++ b/module/project/view/story.html.php
@@ -13,21 +13,21 @@
project->confirmUnlinkStory)?>
+