diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php
index 0b463fe37..0394fba46 100644
--- a/cis/private/tools/zeitaufzeichnung.php
+++ b/cis/private/tools/zeitaufzeichnung.php
@@ -297,11 +297,47 @@ echo '
}
});
+ function updateArbeitsbeschreibung() {
+ let selectedProjekt = $("#projekt").find("option:selected");
+ let selectedPhase = $("#projektphase").find("option:selected");
+
+ let arbeitsbeschreibungProjekt = selectedProjekt.data("arbeitsbeschreibung");
+ let arbeitsbeschreibungPhase = selectedPhase.data("arbeitsbeschreibung");
+
+ if (arbeitsbeschreibungPhase !== undefined && selectedPhase !== "")
+ {
+ if (arbeitsbeschreibungPhase)
+ {
+ $("#beschreibung-textarea").attr("required", true);
+ }
+ else
+ {
+ $("#beschreibung-textarea").removeAttr("required");
+ }
+ }
+ else if (arbeitsbeschreibungProjekt)
+ {
+ $("#beschreibung-textarea").attr("required", true);
+ }
+ else
+ {
+ $("#beschreibung-textarea").removeAttr("required");
+ }
+ }
+
$("#projekt").change(
function()
{
var uid = $("#uidpass").val();
getProjektphasen($(this).val(),uid);
+ updateArbeitsbeschreibung();
+ }
+ )
+
+ $("#projektphase").change(
+ function()
+ {
+ updateArbeitsbeschreibung();
}
)
@@ -334,6 +370,7 @@ echo '
$(this).trigger("isVisible");
});
+ updateArbeitsbeschreibung();
});
function setbisdatum()
@@ -617,7 +654,7 @@ echo '
var projphasenhtml = "";
for (var i = 0; i < json.length; i++)
{
- projphasenhtml += "';
+ echo '';
}
echo '';
@@ -1266,7 +1303,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
else
$selected = '';
- echo '';
}
@@ -1390,7 +1427,7 @@ if ($projekt->getProjekteMitarbeiter($user, true))
if (!$adminView)
{
//Beschreibung
- echo '
| | | ';
//SpeichernButton
if($zeitaufzeichnung_id == '')
diff --git a/cis/private/tools/zeitaufzeichnung_projektphasen.php b/cis/private/tools/zeitaufzeichnung_projektphasen.php
index 05df74443..753ab5b0a 100644
--- a/cis/private/tools/zeitaufzeichnung_projektphasen.php
+++ b/cis/private/tools/zeitaufzeichnung_projektphasen.php
@@ -87,6 +87,7 @@ if (isset($_GET['projekt_kurzbz']))
$item['start'] = $datum_obj->formatDatum($row->start, 'd.m.Y');
$item['ende'] = $datum_obj->formatDatum($row->ende, 'd.m.Y');
$item['zeitaufzeichnung_erlaubt'] = $row->zeitaufzeichnung;
+ $item['arbeitsbeschreibung'] = $db->db_parse_bool($row->arbeitsbeschreibung);
$result_obj[] = $item;
}
}
diff --git a/content/projekt/projekt.overlay.js.php b/content/projekt/projekt.overlay.js.php
index 19fe9e2e1..3539cae78 100644
--- a/content/projekt/projekt.overlay.js.php
+++ b/content/projekt/projekt.overlay.js.php
@@ -154,6 +154,7 @@ function onselectProjekt()
var anzahl_ma=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anzahl_ma" ));
var aufwandstyp_kurzbz=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#aufwandstyp_kurzbz" ));
var zeitaufzeichnung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnung" ));
+ var arbeitsbeschreibung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#arbeitsbeschreibung" ));
if (!zeitaufzeichnung)
{
@@ -164,6 +165,15 @@ function onselectProjekt()
zeitaufzeichnung='Ja';
}
+ if (!arbeitsbeschreibung)
+ {
+ arbeitsbeschreibung='Nein';
+ }
+ else
+ {
+ arbeitsbeschreibung='Ja';
+ }
+
//Daten den Feldern zuweisen
document.getElementById('textbox-projekt-detail-projekt_kurzbz').value=projekt_kurzbz;
@@ -184,6 +194,11 @@ function onselectProjekt()
else
document.getElementById('checkbox-projekt-detail-zeitaufzeichnung').checked=true;
+ if(arbeitsbeschreibung=='Nein')
+ document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked=false;
+ else
+ document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked=true;
+
MenulistSelectItemOnValue('menulist-projekt-detail-aufwandstyp', aufwandstyp_kurzbz);
@@ -218,11 +233,10 @@ function saveProjektDetail()
anzahl_ma = document.getElementById('textbox-projekt-anzahl_ma').value;
aufwand_pt = document.getElementById('textbox-projekt-aufwand_pt').value;
zeitaufzeichnung = document.getElementById('checkbox-projekt-detail-zeitaufzeichnung').checked;
+ arbeitsbeschreibung = document.getElementById('checkbox-projekt-detail-arbeitsbeschreibung').checked;
var soapBody = new SOAPObject("saveProjekt");
- //soapBody.appendChild(new SOAPObject("username")).val('joe');
- //soapBody.appendChild(new SOAPObject("passwort")).val('waschl');
-
+
var projekt = new SOAPObject("projekt");
projekt.appendChild(new SOAPObject("projekt_kurzbz")).val(projekt_kurzbz);
projekt.appendChild(new SOAPObject("oe_kurzbz")).val(oe_kurzbz);
@@ -246,6 +260,15 @@ function saveProjektDetail()
projekt.appendChild(new SOAPObject("zeitaufzeichnung")).val('false');
}
+ if(arbeitsbeschreibung)
+ {
+ projekt.appendChild(new SOAPObject("arbeitsbeschreibung")).val('true');
+ }
+ else
+ {
+ projekt.appendChild(new SOAPObject("arbeitsbeschreibung")).val('false');
+ }
+
if(neu)
{
projekt.appendChild(new SOAPObject("neu")).val('true');
diff --git a/content/projekt/projektdetail.overlay.xul.php b/content/projekt/projektdetail.overlay.xul.php
index fda08baa5..ddc09155b 100644
--- a/content/projekt/projektdetail.overlay.xul.php
+++ b/content/projekt/projektdetail.overlay.xul.php
@@ -173,6 +173,15 @@ echo '';
+
+
+
+
+
+
+
+
+
diff --git a/content/projekt/projektphase.overlay.js.php b/content/projekt/projektphase.overlay.js.php
index c3114d1e6..a7fb7dcf5 100644
--- a/content/projekt/projektphase.overlay.js.php
+++ b/content/projekt/projektphase.overlay.js.php
@@ -162,6 +162,7 @@ function onselectTreeProjektphase()
var personentage=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#personentage" ));
var farbe=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#farbe" ));
var zeitaufzeichnung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnung" ));
+ var arbeitsbeschreibung=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#arbeitsbeschreibung" ));
if (!zeitaufzeichnung)
{
@@ -171,6 +172,15 @@ function onselectTreeProjektphase()
{
zeitaufzeichnung='Ja';
}
+
+ if (!arbeitsbeschreibung)
+ {
+ arbeitsbeschreibung='Nein';
+ }
+ else
+ {
+ arbeitsbeschreibung='Ja';
+ }
//alert(typ);
//Daten den Feldern zuweisen
@@ -194,6 +204,11 @@ function onselectTreeProjektphase()
else
document.getElementById('checkbox-projektphase-detail-zeitaufzeichnung').checked=true;
+ if(arbeitsbeschreibung=='Nein')
+ document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked=false;
+ else
+ document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked=true;
+
MenulistSelectItemOnValue('menulist-projektphase-detail-projektphase_fk', projektphase_fk);
MenulistSelectItemOnValue('menulist-projektphase-detail-ressource', ressource_id);
@@ -248,6 +263,7 @@ function saveProjektphaseDetail()
var farbe = document.getElementById('textbox-projektphase-detail-farbe').value;
var neu = document.getElementById('checkbox-projektphase-detail-neu').checked;
var zeitaufzeichnung = document.getElementById('checkbox-projektphase-detail-zeitaufzeichnung').checked;
+ var arbeitsbeschreibung = document.getElementById('checkbox-projektphase-detail-arbeitsbeschreibung').checked;
var soapBody = new SOAPObject("saveProjektphase");
//soapBody.appendChild(new SOAPObject("username")).val('joe');
@@ -274,6 +290,15 @@ function saveProjektphaseDetail()
{
phase.appendChild(new SOAPObject("zeitaufzeichnung")).val('false');
}
+
+ if(arbeitsbeschreibung)
+ {
+ phase.appendChild(new SOAPObject("arbeitsbeschreibung")).val('true');
+ }
+ else
+ {
+ phase.appendChild(new SOAPObject("arbeitsbeschreibung")).val('false');
+ }
if(neu)
{
phase.appendChild(new SOAPObject("neu")).val('true');
diff --git a/content/projekt/projektphasedetail.overlay.xul.php b/content/projekt/projektphasedetail.overlay.xul.php
index 3b48353e0..f5ba05786 100644
--- a/content/projekt/projektphasedetail.overlay.xul.php
+++ b/content/projekt/projektphasedetail.overlay.xul.php
@@ -153,6 +153,15 @@ echo '';
+
+
+
+
+
+
+
+
+
diff --git a/include/projekt.class.php b/include/projekt.class.php
index 79b706be9..c0c9913eb 100644
--- a/include/projekt.class.php
+++ b/include/projekt.class.php
@@ -48,6 +48,7 @@ class projekt extends basis_db
public $anzahl_ma; // integer
public $aufwand_pt; // integer
public $zeitaufzeichnung; //bool
+ public $arbeitsbeschreibung; //bool
public $sap_project_id;
@@ -88,6 +89,7 @@ class projekt extends basis_db
$this->anzahl_ma = $row->anzahl_ma;
$this->aufwand_pt = $row->aufwand_pt;
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
return true;
}
@@ -143,6 +145,7 @@ class projekt extends basis_db
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -187,6 +190,7 @@ class projekt extends basis_db
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -230,6 +234,7 @@ class projekt extends basis_db
$obj->anzahl_ma = $row->anzahl_ma;
$obj->aufwand_pt = $row->aufwand_pt;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -297,7 +302,7 @@ class projekt extends basis_db
{
//Neuen Datensatz einfuegen
- $qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz, zeitaufzeichnung) VALUES('.
+ $qry = 'INSERT INTO fue.tbl_projekt (projekt_kurzbz, nummer, titel,beschreibung, beginn, ende, budget, farbe, oe_kurzbz, aufwand_pt, anzahl_ma, aufwandstyp_kurzbz, zeitaufzeichnung, arbeitsbeschreibung) VALUES('.
$this->db_add_param($this->projekt_kurzbz).', '.
$this->db_add_param($this->nummer).', '.
$this->db_add_param($this->titel).', '.
@@ -310,7 +315,8 @@ class projekt extends basis_db
$this->db_add_param($this->aufwand_pt).','.
$this->db_add_param($this->anzahl_ma).','.
$this->db_add_param($this->aufwandstyp_kurzbz).', '.
- $this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).');';
+ $this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
+ $this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).');';
}
else
{
@@ -329,7 +335,8 @@ class projekt extends basis_db
'anzahl_ma='.$this->db_add_param($this->anzahl_ma).', '.
'aufwand_pt='.$this->db_add_param($this->aufwand_pt).', '.
'aufwandstyp_kurzbz='.$this->db_add_param($this->aufwandstyp_kurzbz).', '.
- 'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).' '.
+ 'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
+ 'arbeitsbeschreibung='.$this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).' '.
'WHERE projekt_kurzbz='.$this->db_add_param($this->projekt_kurzbz).';';
}
@@ -429,6 +436,7 @@ class projekt extends basis_db
$obj->ende = $row->ende;
$obj->oe_kurzbz = $row->oe_kurzbz;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -583,6 +591,7 @@ class projekt extends basis_db
$this->anzahl_ma = $row->anzahl_ma;
$this->aufwand_pt = $row->aufwand_pt;
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
return true;
}
diff --git a/include/projektphase.class.php b/include/projektphase.class.php
index c7b224861..f011e2aac 100644
--- a/include/projektphase.class.php
+++ b/include/projektphase.class.php
@@ -49,6 +49,7 @@ class projektphase extends basis_db
public $updateamum; // timestamp
public $updatevon; // bigint
public $zeitaufzeichnung; // bool
+ public $arbeitsbeschreibung; // bool
public $project_task_id;
@@ -103,6 +104,7 @@ class projektphase extends basis_db
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $this->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
return true;
}
else
@@ -161,6 +163,7 @@ class projektphase extends basis_db
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -216,6 +219,7 @@ class projektphase extends basis_db
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -263,6 +267,7 @@ class projektphase extends basis_db
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->zeitaufzeichnung = $this->db_parse_bool($row->zeitaufzeichnung);
+ $obj->arbeitsbeschreibung = $this->db_parse_bool($row->arbeitsbeschreibung);
$this->result[] = $obj;
}
@@ -323,7 +328,7 @@ class projektphase extends basis_db
{
//Neuen Datensatz einfuegen
$qry='BEGIN; INSERT INTO fue.tbl_projektphase (projekt_kurzbz, projektphase_fk, bezeichnung, typ,
- beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage, zeitaufzeichnung) VALUES ('.
+ beschreibung, start, ende, budget, ressource_id, insertvon, insertamum, updatevon, updateamum, farbe, personentage, zeitaufzeichnung, arbeitsbeschreibung) VALUES ('.
$this->db_add_param($this->projekt_kurzbz).', '.
$this->db_add_param($this->projektphase_fk).', '.
$this->db_add_param($this->bezeichnung).', '.
@@ -337,7 +342,8 @@ class projektphase extends basis_db
$this->db_add_param($this->updatevon).', now(), '.
$this->db_add_param($this->farbe).', '.
$this->db_add_param($this->personentage).', '.
- $this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).');';
+ $this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
+ $this->db_add_param($this->arbeitsbeschreibung, FHC_BOOLEAN).');';
}
else
{
@@ -357,7 +363,8 @@ class projektphase extends basis_db
'personentage='.$this->db_add_param($this->personentage).', '.
'updateamum= now(), '.
'updatevon='.$this->db_add_param($this->updatevon).', '.
- 'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung,FHC_BOOLEAN).' '.
+ 'zeitaufzeichnung='.$this->db_add_param($this->zeitaufzeichnung, FHC_BOOLEAN).', '.
+ 'arbeitsbeschreibung='.$this->db_add_param($this->arbeitsbeschreibung,FHC_BOOLEAN).' '.
'WHERE projektphase_id='.$this->db_add_param($this->projektphase_id, FHC_INTEGER).';';
}
@@ -819,6 +826,7 @@ class projektphase extends basis_db
$obj->insertvon = $row->insertvon;
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
+ $obj->arbeitsbeschreibung = $row->arbeitsbeschreibung;
$this->result[] = $obj;
}
diff --git a/include/zeitaufzeichnung_import.class.php b/include/zeitaufzeichnung_import.class.php
index 2d2109b2f..5b4fb2f70 100644
--- a/include/zeitaufzeichnung_import.class.php
+++ b/include/zeitaufzeichnung_import.class.php
@@ -222,36 +222,63 @@ class zeitaufzeichnung_import {
}
}
- /**
- * @param string $phase The Projektphase ID
- * @return void
- *
- * @throws Exception
- */
-protected function checkPhaseBebuchbar($phase)
-{
- if ($this->phase->getPhasenZA($phase) == 'f')
+ /**
+ * @param string $phase The Projektphase ID
+ * @return void
+ *
+ * @throws Exception
+ */
+ protected function checkPhaseBebuchbar($phase)
{
- throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Dieses Arbeitspaket darf nicht bebucht werden!');
- }
-}
-
-/**
-* @param string $phase The Projektphase ID
-* @return void
-*
-* @throws Exception
-*/
-protected function checkIfArbeitspaketZuWaehlen($projekt_kurzbz, $phase)
-{
- if ($projekt_kurzbz != '')
- {
- $this->project->load($projekt_kurzbz);
- if (!$this->project->zeitaufzeichnung && !$phase)
+ if ($this->phase->getPhasenZA($phase) == 'f')
{
- throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte ein Arbeitspaket wählen!');
+ throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Dieses Arbeitspaket darf nicht bebucht werden!');
+ }
+ }
+
+ /**
+ * @param string $phase The Projektphase ID
+ * @return void
+ *
+ * @throws Exception
+ */
+ protected function checkIfArbeitspaketZuWaehlen($projekt_kurzbz, $phase)
+ {
+ if ($projekt_kurzbz != '')
+ {
+ $this->project->load($projekt_kurzbz);
+
+ if (!$this->project->zeitaufzeichnung && !$phase)
+ {
+ throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte ein Arbeitspaket wählen!');
+ }
+ }
+ }
+
+ protected function checkIfArbeitsbeschreibungRequired($projekt_kurzbz, $beschreibung)
+ {
+ if ($projekt_kurzbz != '')
+ {
+ $this->project->load($projekt_kurzbz);
+
+ if ($this->project->arbeitsbeschreibung && empty(trim($beschreibung)))
+ {
+ throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte eine Beschreibung angeben!');
+ }
+ }
+ }
+
+ protected function checkIfArbeitsbeschreibungRequiredPhase($phase, $beschreibung)
+ {
+ if ($phase != '')
+ {
+ $this->phase->load($phase);
+
+ if ($this->phase->arbeitsbeschreibung && empty(trim($beschreibung)))
+ {
+ throw new Exception($this->p->t("global/fehlerBeimSpeichernDerDaten") . ': Bitte eine Beschreibung angeben!');
+ }
}
}
-}
}
diff --git a/include/zeitaufzeichnung_import_csv.class.php b/include/zeitaufzeichnung_import_csv.class.php
index 71f3ab75f..ee601f07e 100644
--- a/include/zeitaufzeichnung_import_csv.class.php
+++ b/include/zeitaufzeichnung_import_csv.class.php
@@ -174,6 +174,10 @@ class zeitaufzeichnung_import_csv extends zeitaufzeichnung_import {
if(empty($data[self::PHASE]))
$this->checkProjectInterval($data[self::PROJEKT], $data[self::STARTDT], $data[self::ENDEDT]);
$this->checkPhaseInterval($data[self::PHASE], $data[self::STARTDT], $data[self::ENDEDT]);
+ if ($data[self::PHASE] !== "")
+ $this->checkIfArbeitsbeschreibungRequiredPhase($data[self::PHASE], $data[self::BESCHREIBUNG]);
+ else
+ $this->checkIfArbeitsbeschreibungRequired($data[self::PROJEKT], $data[self::BESCHREIBUNG]);
$this->checkVals($data[self::OE],$data[self::PROJEKT],$data[self::PHASE],$data[self::SERVICE]);
$this->mapLehreIntern($data);
$this->prepareZeitaufzeichnung($data);
diff --git a/include/zeitaufzeichnung_import_post.class.php b/include/zeitaufzeichnung_import_post.class.php
index ded9344fb..3c53a2a31 100644
--- a/include/zeitaufzeichnung_import_post.class.php
+++ b/include/zeitaufzeichnung_import_post.class.php
@@ -74,6 +74,10 @@ class zeitaufzeichnung_import_post extends zeitaufzeichnung_import {
$this->processPause($this->data['von_pause'], $this->data['bis_pause']);
$this->checkPhaseBebuchbar($this->data['projektphase_id']);
$this->checkIfArbeitspaketZuWaehlen($this->data['projekt_kurzbz'], $this->data['projektphase_id']);
+ if ($this->data['projektphase_id'] !== "")
+ $this->checkIfArbeitsbeschreibungRequiredPhase($this->data['projektphase_id'], $this->data['beschreibung']);
+ else
+ $this->checkIfArbeitsbeschreibungRequired($this->data['projekt_kurzbz'], $this->data['beschreibung']);
$this->saveZeit();
} catch (Exception $ex) {
$this->addError($ex->getMessage());
diff --git a/rdf/projekt.rdf.php b/rdf/projekt.rdf.php
index 38f4c52de..92d82521b 100644
--- a/rdf/projekt.rdf.php
+++ b/rdf/projekt.rdf.php
@@ -73,6 +73,7 @@ for ($i=0;$iresult);$i++)
'.$projekt->aufwand_pt.'
'.$projekt->aufwandstyp_kurzbz.'
'.$projekt->zeitaufzeichnung.'
+ '.$projekt->arbeitsbeschreibung.'
'."\n";
$sequenz.=''."\n";
diff --git a/rdf/projektphase.rdf.php b/rdf/projektphase.rdf.php
index cf3a536df..6c1fa0188 100644
--- a/rdf/projektphase.rdf.php
+++ b/rdf/projektphase.rdf.php
@@ -64,6 +64,7 @@ if($projektphase_id != '')
$oRdf->obj[$i]->setAttribut('typ',$phase->typ);
$oRdf->obj[$i]->setAttribut('ressource_id',$phase->ressource_id);
$oRdf->obj[$i]->setAttribut('zeitaufzeichnung',$phase->zeitaufzeichnung);
+ $oRdf->obj[$i]->setAttribut('arbeitsbeschreibung',$phase->arbeitsbeschreibung);
if($phase->projektphase_fk!='')
$oRdf->addSequence($phase->projektphase_id, $phase->projektphase_fk);
@@ -97,6 +98,7 @@ else if($projekt_kurzbz != '')
$oRdf->obj[$idx]->setAttribut('farbe', '');
$oRdf->obj[$idx]->setAttribut('typ', '');
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
+ $oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung','');
$oRdf->addSequence('opt');
}
@@ -117,6 +119,7 @@ else if($projekt_kurzbz != '')
$oRdf->obj[$idx]->setAttribut('farbe', $phase->farbe);
$oRdf->obj[$idx]->setAttribut('typ', $phase->typ);
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$phase->zeitaufzeichnung);
+ $oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$phase->arbeitsbeschreibung);
$oRdf->addSequence($phase->projektphase_id);
}
@@ -179,6 +182,7 @@ else
$oRdf->obj[$idx]->setAttribut('ende','');
$oRdf->obj[$idx]->setAttribut('typ','organisationseinheit');
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung','');
+ $oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung','');
$oRdf->addSequence($projekt->oe_kurzbz);
@@ -201,6 +205,7 @@ else
$oRdf->obj[$idx]->setAttribut('ende',$datum_obj->formatDatum($projekt->ende,'d.m.Y'));
$oRdf->obj[$idx]->setAttribut('typ','projekt');
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$projekt->zeitaufzeichnung);
+ $oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$projekt->arbeitsbeschreibung);
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz, $projekt->oe_kurzbz);
@@ -242,6 +247,7 @@ else
$oRdf->obj[$idx]->setAttribut('ressource_bezeichnung',$projektphase->ressource_bezeichnung);
$oRdf->obj[$idx]->setAttribut('ressource_id',$projektphase->ressource_id);
$oRdf->obj[$idx]->setAttribut('zeitaufzeichnung',$projektphase->zeitaufzeichnung);
+ $oRdf->obj[$idx]->setAttribut('arbeitsbeschreibung',$projektphase->arbeitsbeschreibung);
if (!is_null($projektphase->projektphase_fk))
$oRdf->addSequence($projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_id, $projekt->oe_kurzbz.'/'.$projekt->projekt_kurzbz.'/'.$projektphase->projektphase_fk);
else
diff --git a/soap/projekt.soap.php b/soap/projekt.soap.php
index faeefdc2d..84c246c4a 100644
--- a/soap/projekt.soap.php
+++ b/soap/projekt.soap.php
@@ -81,6 +81,15 @@ function saveProjekt($username, $passwort, $projekt)
$projektNew->zeitaufzeichnung = false;
}
+ if($projekt->arbeitsbeschreibung=='true')
+ {
+ $projektNew->arbeitsbeschreibung = true;
+ }
+ else
+ {
+ $projektNew->arbeitsbeschreibung = false;
+ }
+
if($projekt->neu=='true')
{
$projektNew->new = true;
diff --git a/soap/projektphase.soap.php b/soap/projektphase.soap.php
index 640f0c19d..4e7470655 100644
--- a/soap/projektphase.soap.php
+++ b/soap/projektphase.soap.php
@@ -91,6 +91,15 @@ function saveProjektphase($username, $passwort, $phase)
$projektphase->zeitaufzeichnung = false;
}
+ if($phase->arbeitsbeschreibung=='true')
+ {
+ $projektphase->arbeitsbeschreibung = true;
+ }
+ else
+ {
+ $projektphase->arbeitsbeschreibung = false;
+ }
+
if($phase->neu=='true')
{
$projektphase->new = true;
diff --git a/system/dbupdate_3.4/40428_zeiterfassung_beschreibung_bei_projektzuordnung.php b/system/dbupdate_3.4/40428_zeiterfassung_beschreibung_bei_projektzuordnung.php
new file mode 100644
index 000000000..3e1c1becf
--- /dev/null
+++ b/system/dbupdate_3.4/40428_zeiterfassung_beschreibung_bei_projektzuordnung.php
@@ -0,0 +1,23 @@
+db_query("SELECT arbeitsbeschreibung FROM fue.tbl_projekt LIMIT 1"))
+{
+ $qry = "ALTER TABLE fue.tbl_projekt ADD COLUMN arbeitsbeschreibung BOOLEAN NOT NULL DEFAULT false;";
+
+ if(!$db->db_query($qry))
+ echo 'fue.tbl_projekt '.$db->db_last_error().' ';
+ else
+ echo ' Spalte arbeitsbeschreibung zu fue.tbl_projekt hinzugefügt';
+}
+
+if (!$result = @$db->db_query("SELECT arbeitsbeschreibung FROM fue.tbl_projektphase LIMIT 1"))
+{
+ $qry = "ALTER TABLE fue.tbl_projektphase ADD COLUMN arbeitsbeschreibung BOOLEAN NOT NULL DEFAULT false;";
+
+ if(!$db->db_query($qry))
+ echo 'fue.tbl_projektphase '.$db->db_last_error().' ';
+ else
+ echo ' Spalte arbeitsbeschreibung zu fue.tbl_projektphase hinzugefügt';
+}
+
|