Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
22045603
Commit
22045603
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix bad update of denormalized field
parent
9c12c325
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/projet/class/task.class.php
+2
-2
2 additions, 2 deletions
htdocs/projet/class/task.class.php
with
2 additions
and
2 deletions
htdocs/projet/class/task.class.php
+
2
−
2
View file @
22045603
...
...
@@ -807,7 +807,7 @@ class Task extends CommonObject
if
(
$ret
>=
0
)
{
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"projet_task"
;
$sql
.
=
" SET duration_effective =
duration_effective + '"
.
price2num
(
$this
->
timespent_duration
)
.
"
'
"
;
$sql
.
=
" SET duration_effective =
(SELECT SUM(task_duration) FROM "
.
MAIN_DB_PREFIX
.
"projet_task_time as ptt where ptt.fk_task = "
.
$this
->
id
.
"
)
"
;
if
(
isset
(
$this
->
progress
))
$sql
.
=
", progress = "
.
$this
->
progress
;
// Do not overwrite value if not provided
$sql
.
=
" WHERE rowid = "
.
$this
->
id
;
...
...
@@ -980,7 +980,7 @@ class Task extends CommonObject
$newDuration
=
$this
->
timespent_duration
-
$this
->
timespent_old_duration
;
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"projet_task"
;
$sql
.
=
" SET duration_effective =
duration_effec
ti
v
e
+ '"
.
$newDuration
.
"
'
"
;
$sql
.
=
" SET duration_effective =
(SELECT SUM(task_duration) FROM "
.
MAIN_DB_PREFIX
.
"projet_task_
ti
m
e
as ptt where ptt.fk_task = "
.
$this
->
id
.
"
)
"
;
$sql
.
=
" WHERE rowid = "
.
$this
->
id
;
dol_syslog
(
get_class
(
$this
)
.
"::updateTimeSpent"
,
LOG_DEBUG
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment