Merge in TimeTracker fix for users removed from a project with

existing report entries.
This commit is contained in:
Colin Kuskie 2009-01-27 17:35:40 +00:00
parent f58858f07c
commit 0a8cf1c9f7
2 changed files with 30 additions and 16 deletions

View file

@ -11,8 +11,9 @@
- removed random questions display from Survey Questions Edit template until
that feature is added.
- fixed #9115: WebGUI::ProfileField->formField doesn't always show the submitted value
- fixed: utf8 issues with Survey should be correct. JSON fields are now
longText instead of longBlob.
- fixed: utf8 issues with Survey should be correct. JSON fields are now longText instead of longBlob.
- fixed #9522: Time tracker does not display
7.6.9
- fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer
- fixed #9264: new slideShow.swf uploaded in extras/ukplayer (United Knowledge/Arjan Widlak)

View file

@ -832,20 +832,41 @@ sub _buildRow {
-name=>"taskEntryId_$rowCount",
-value=>$entryId
});
#Entry Date
##Handle cases when a user has been removed from a project. The projectList
##and taskList hash refs that have been passed in will not contain entries for
##their old project info
#Entry Task
tie my %taskHash, "Tie::IxHash";
if ($projectId) {
if (! exists $projectList->{$projectId}) {
my $projectName = $db->quickScalar('select projectName from TT_projectList where projectId=?',[$projectId]);
$projectList->{$projectId} = $projectName;
}
if (! exists $taskList->{$projectId}) {
%taskHash = $db->buildHash("select taskId, taskName from TT_projectTasks where projectId=?",[$projectId]);
}
else {
%taskHash = %{$taskList->{$projectId}};
}
#$eh->warn($projectId);
}
my $chooseLabel = $i18n->get("Choose One");
%taskHash = (""=>$chooseLabel,%taskHash);
#Entry Date
$var->{'entry.hours'} = $entry->{hours};
if($reportComplete) {
$var->{'form.date'} = $entry->{taskDate};
$var->{'form.project'} = $projectList->{$projectId};
my $taskHash = $taskList->{$projectId};
$var->{'form.task'} = $taskHash->{$entry->{taskId}};
$var->{'form.task'} = $taskHash{$entry->{taskId}};
$var->{'form.hours'} = $var->{'entry.hours'};
$var->{'form.comments'} = $entry->{comments};
} else {
}
else {
tie my %days, "Tie::IxHash";
%days = (""=>$chooseLabel, %{$daysInWeek});
$var->{'form.date'} = WebGUI::Form::selectBox($session,{
@ -863,15 +884,7 @@ sub _buildRow {
-value=>$projectId,
-extras=>qq|onchange="changeOptions(this,document.getElementById('$taskId'));" class="pt-select"|
});
#Entry Task
tie my %taskHash, "Tie::IxHash";
%taskHash = (""=>$chooseLabel,%taskHash);
if($projectId) {
#$eh->warn($projectId);
%taskHash = %{$taskList->{$projectId}};
}
$var->{'form.task'} = WebGUI::Form::selectBox($session,{
-name=>$taskName,
-options=>\%taskHash,