Skip to content
Snippets Groups Projects
Commit 9166dc2d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: priority is a field smallint.

parent 9aaafde6
Branches
Tags
No related merge requests found
...@@ -58,7 +58,7 @@ class ActionComm extends CommonObject ...@@ -58,7 +58,7 @@ class ActionComm extends CommonObject
var $percentage; // Percentage var $percentage; // Percentage
var $location; // Location var $location; // Location
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
var $priority; // Free text ('' By default) var $priority; // Small int (0 By default)
var $note; // Description var $note; // Description
var $usertodo; // Object user that must do action var $usertodo; // Object user that must do action
...@@ -116,7 +116,7 @@ class ActionComm extends CommonObject ...@@ -116,7 +116,7 @@ class ActionComm extends CommonObject
$this->location=dol_trunc(trim($this->location),128); $this->location=dol_trunc(trim($this->location),128);
$this->note=dol_htmlcleanlastbr(trim($this->note)); $this->note=dol_htmlcleanlastbr(trim($this->note));
if (empty($this->percentage)) $this->percentage = 0; if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority)) $this->priority = 0; if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0; if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if (empty($this->punctual)) $this->punctual = 0; if (empty($this->punctual)) $this->punctual = 0;
if (empty($this->transparency)) $this->transparency = 0; if (empty($this->transparency)) $this->transparency = 0;
...@@ -438,7 +438,7 @@ class ActionComm extends CommonObject ...@@ -438,7 +438,7 @@ class ActionComm extends CommonObject
$this->label=trim($this->label); $this->label=trim($this->label);
$this->note=trim($this->note); $this->note=trim($this->note);
if (empty($this->percentage)) $this->percentage = 0; if (empty($this->percentage)) $this->percentage = 0;
if (empty($this->priority)) $this->priority = 0; if (empty($this->priority) || ! is_numeric($this->priority)) $this->priority = 0;
if (empty($this->transparency)) $this->transparency = 0; if (empty($this->transparency)) $this->transparency = 0;
if (empty($this->fulldayevent)) $this->fulldayevent = 0; if (empty($this->fulldayevent)) $this->fulldayevent = 0;
if ($this->percentage > 100) $this->percentage = 100; if ($this->percentage > 100) $this->percentage = 100;
...@@ -1064,7 +1064,7 @@ class ActionComm extends CommonObject ...@@ -1064,7 +1064,7 @@ class ActionComm extends CommonObject
$this->percentage=0; $this->percentage=0;
$this->location='Location'; $this->location='Location';
$this->transparency=0; $this->transparency=0;
$this->priority='Priority X'; $this->priority=1;
$this->note = 'Note'; $this->note = 'Note';
} }
......
...@@ -167,8 +167,7 @@ if ($action == 'add_action') ...@@ -167,8 +167,7 @@ if ($action == 'add_action')
$actioncomm->datep = $datep; $actioncomm->datep = $datep;
$actioncomm->datef = $datef; $actioncomm->datef = $datef;
$actioncomm->percentage = $percentage; $actioncomm->percentage = $percentage;
$actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * $actioncomm->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
60;
$usertodo=new User($db); $usertodo=new User($db);
if ($_POST["affectedto"] > 0) if ($_POST["affectedto"] > 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment