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
29302396
Commit
29302396
authored
15 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Works on enhancement of project tasks
parent
cf13e466
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/projet/tasks/fiche.php
+26
-18
26 additions, 18 deletions
htdocs/projet/tasks/fiche.php
htdocs/projet/tasks/task.class.php
+4
-1
4 additions, 1 deletion
htdocs/projet/tasks/task.class.php
with
30 additions
and
19 deletions
htdocs/projet/tasks/fiche.php
+
26
−
18
View file @
29302396
<?php
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-200
9
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-20
1
0 Regis Houssin <regis@dolibarr.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/projet/tasks/task.class.php");
...
@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/projet/tasks/task.class.php");
require_once
(
DOL_DOCUMENT_ROOT
.
"/html.formother.class.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/html.formother.class.php"
);
$projectid
=
''
;
$projectid
=
''
;
$projectid
=
isset
(
$_REQUEST
[
"id"
])
?
$_REQUEST
[
"id"
]
:
$_POST
[
"
project
id"
];
$projectid
=
isset
(
$_REQUEST
[
"id"
])
?
$_REQUEST
[
"id"
]
:
$_POST
[
"id"
];
// Security check
// Security check
if
(
$user
->
societe_id
)
$socid
=
$user
->
societe_id
;
if
(
$user
->
societe_id
)
$socid
=
$user
->
societe_id
;
...
@@ -59,7 +59,7 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
...
@@ -59,7 +59,7 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
{
{
$tmparray
=
explode
(
'_'
,
$_POST
[
'task_parent'
]);
$tmparray
=
explode
(
'_'
,
$_POST
[
'task_parent'
]);
$projectid
=
$tmparray
[
0
];
$projectid
=
$tmparray
[
0
];
if
(
empty
(
$projectid
))
$projectid
=
$_POST
[
"
project
id"
];
// If projectid is ''
if
(
empty
(
$projectid
))
$projectid
=
$_POST
[
"id"
];
// If projectid is ''
$task_parent
=
$tmparray
[
1
];
$task_parent
=
$tmparray
[
1
];
if
(
empty
(
$task_parent
))
$task_parent
=
0
;
// If task_parent is ''
if
(
empty
(
$task_parent
))
$task_parent
=
0
;
// If task_parent is ''
...
@@ -72,13 +72,15 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
...
@@ -72,13 +72,15 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
$task
->
date_c
=
dol_now
(
'tzserver'
);
$task
->
date_c
=
dol_now
(
'tzserver'
);
$task
->
date_start
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
'dateomonth'
],
$_POST
[
'dateoday'
],
$_POST
[
'dateoyear'
]);
$task
->
date_start
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
'dateomonth'
],
$_POST
[
'dateoday'
],
$_POST
[
'dateoyear'
]);
$task
->
date_end
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
'dateemonth'
],
$_POST
[
'dateeday'
],
$_POST
[
'dateeyear'
]);
$task
->
date_end
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
'dateemonth'
],
$_POST
[
'dateeday'
],
$_POST
[
'dateeyear'
]);
$task
->
progress
=
$_POST
[
'progress'
];
$taskid
=
$task
->
create
(
$user
);
$taskid
=
$task
->
create
(
$user
);
if
(
$taskid
>
0
)
if
(
$taskid
>
0
)
{
{
$task
->
update
(
$user
);
$task
->
update
(
$user
);
}
$result
=
$task
->
add_contact
(
$_POST
[
"userid"
],
'TASKEXECUTIVE'
,
'internal'
);
}
}
}
}
...
@@ -96,13 +98,14 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
...
@@ -96,13 +98,14 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
}
}
}
}
}
}
}
/*
/*
* View
* View
*/
*/
$form
=
new
Form
(
$db
);
$form
=
new
Form
(
$db
);
$
html
other
=
new
FormOther
(
$db
);
$
form
other
=
new
FormOther
(
$db
);
$help_url
=
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"
;
$help_url
=
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"
;
llxHeader
(
""
,
$langs
->
trans
(
"Tasks"
),
$help_url
);
llxHeader
(
""
,
$langs
->
trans
(
"Tasks"
),
$help_url
);
...
@@ -127,7 +130,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
...
@@ -127,7 +130,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print
'<form action="'
.
$_SERVER
[
'PHP_SELF'
]
.
'" method="POST">'
;
print
'<form action="'
.
$_SERVER
[
'PHP_SELF'
]
.
'" method="POST">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<input type="hidden" name="action" value="createtask">'
;
print
'<input type="hidden" name="action" value="createtask">'
;
if
(
$_GET
[
'id'
])
print
'<input type="hidden" name="
project
id" value="'
.
$_GET
[
'id'
]
.
'">'
;
if
(
$_GET
[
'id'
])
print
'<input type="hidden" name="id" value="'
.
$_GET
[
'id'
]
.
'">'
;
if
(
$_GET
[
'mode'
])
print
'<input type="hidden" name="mode" value="'
.
$_GET
[
'mode'
]
.
'">'
;
if
(
$_GET
[
'mode'
])
print
'<input type="hidden" name="mode" value="'
.
$_GET
[
'mode'
]
.
'">'
;
print
'<table class="border" width="100%">'
;
print
'<table class="border" width="100%">'
;
...
@@ -137,7 +140,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
...
@@ -137,7 +140,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print
'</td></tr>'
;
print
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"ChildOfTask"
)
.
'</td><td>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"ChildOfTask"
)
.
'</td><td>'
;
print
$
html
other
->
selectProjectTasks
(
$projectid
,
'task_parent'
,
$user
->
admin
?
0
:
1
,
0
,
1
);
print
$
form
other
->
selectProjectTasks
(
$projectid
,
'task_parent'
,
$user
->
admin
?
0
:
1
,
0
,
1
);
print
'</td></tr>'
;
print
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"AffectedTo"
)
.
'</td><td>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"AffectedTo"
)
.
'</td><td>'
;
...
@@ -154,6 +157,11 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
...
@@ -154,6 +157,11 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print
$form
->
select_date
(
-
1
,
'datee'
);
print
$form
->
select_date
(
-
1
,
'datee'
);
print
'</td></tr>'
;
print
'</td></tr>'
;
// Progress
print
'<tr><td>'
.
$langs
->
trans
(
"Progress"
)
.
'</td><td colspan="3">'
;
print
$formother
->
select_percent
(
$task
->
progress
,
'progress'
);
print
'</td></tr>'
;
// Description
// Description
print
'<tr><td valign="top">'
.
$langs
->
trans
(
"Description"
)
.
'</td>'
;
print
'<tr><td valign="top">'
.
$langs
->
trans
(
"Description"
)
.
'</td>'
;
print
'<td>'
;
print
'<td>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/projet/tasks/task.class.php
+
4
−
1
View file @
29302396
...
@@ -49,6 +49,8 @@ class Task extends CommonObject
...
@@ -49,6 +49,8 @@ class Task extends CommonObject
var
$date_c
;
var
$date_c
;
var
$date_start
;
var
$date_start
;
var
$date_end
;
var
$date_end
;
var
$progress
;
var
$priority
;
var
$fk_user_creat
;
var
$fk_user_creat
;
var
$fk_user_valid
;
var
$fk_user_valid
;
var
$statut
;
var
$statut
;
...
@@ -238,7 +240,8 @@ class Task extends CommonObject
...
@@ -238,7 +240,8 @@ class Task extends CommonObject
$sql
.
=
" description="
.
(
isset
(
$this
->
description
)
?
"'"
.
addslashes
(
$this
->
description
)
.
"'"
:
"null"
)
.
","
;
$sql
.
=
" description="
.
(
isset
(
$this
->
description
)
?
"'"
.
addslashes
(
$this
->
description
)
.
"'"
:
"null"
)
.
","
;
$sql
.
=
" duration_effective="
.
(
isset
(
$this
->
duration_effective
)
?
$this
->
duration_effective
:
"null"
)
.
","
;
$sql
.
=
" duration_effective="
.
(
isset
(
$this
->
duration_effective
)
?
$this
->
duration_effective
:
"null"
)
.
","
;
$sql
.
=
" dateo="
.
(
$this
->
date_start
!=
''
?
$this
->
db
->
idate
(
$this
->
date_start
)
:
'null'
)
.
","
;
$sql
.
=
" dateo="
.
(
$this
->
date_start
!=
''
?
$this
->
db
->
idate
(
$this
->
date_start
)
:
'null'
)
.
","
;
$sql
.
=
" datee="
.
(
$this
->
date_end
!=
''
?
$this
->
db
->
idate
(
$this
->
date_end
)
:
'null'
);
$sql
.
=
" datee="
.
(
$this
->
date_end
!=
''
?
$this
->
db
->
idate
(
$this
->
date_end
)
:
'null'
)
.
","
;
$sql
.
=
" progress="
.
$this
->
progress
;
$sql
.
=
" WHERE rowid="
.
$this
->
id
;
$sql
.
=
" WHERE rowid="
.
$this
->
id
;
$this
->
db
->
begin
();
$this
->
db
->
begin
();
...
...
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