diff --git a/include/entwicklungsteam.class.php b/include/entwicklungsteam.class.php
index f9d0a3718..70b30d325 100644
--- a/include/entwicklungsteam.class.php
+++ b/include/entwicklungsteam.class.php
@@ -157,7 +157,7 @@ class entwicklungsteam extends basis_db
$this->errormsg = 'Besondere Qualifikation muss eingetragen werden';
return false;
}
- if($this->beginn > $this->ende)
+ if($this->ende != '' && $this->beginn > $this->ende)
{
$this->errormsg = 'Endedatum darf nicht vor Anfangsdatum liegen';
return false;
diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php
index 55f8a9d29..f96e5d3fd 100644
--- a/system/dbupdate_3.3.php
+++ b/system/dbupdate_3.3.php
@@ -6045,128 +6045,6 @@ if(!$result = @$db->db_query("SELECT behebung_parameter FROM system.tbl_issue LI
echo '
Added column behebung_parameter to table system.tbl_issue';
}
-//Add column entwicklungs_id to bis.tbl_entwicklungsteam
-if(!@$db->db_query("SELECT entwicklungsteam_id FROM bis.tbl_entwicklungsteam LIMIT 1"))
-{
- $qry = 'ALTER TABLE bis.tbl_entwicklungsteam ADD COLUMN entwicklungsteam_id integer;';
-
- if(!$db->db_query($qry))
- echo ' bis.tbl_entwicklungsteam '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Neue Spalte entwicklungsteam_id hinzugefügt';
-}
-
-//Column entwicklungsteam_id mit Werten befüllen
-if($result = @$db->db_query("SELECT entwicklungsteam_id FROM bis.tbl_entwicklungsteam where entwicklungsteam_id is not null LIMIT 1"))
-{
- if ($db->db_num_rows($result) == 0)
- {
- $qry = 'UPDATE bis.tbl_entwicklungsteam et SET entwicklungsteam_id =
- (SELECT rownumber FROM (SELECT ROW_NUMBER() OVER (ORDER BY mitarbeiter_uid, studiengang_kz)
- AS rownumber, t.* FROM bis.tbl_entwicklungsteam t ORDER BY mitarbeiter_uid, studiengang_kz) rn
- WHERE rn.mitarbeiter_uid = et.mitarbeiter_uid
- AND rn.studiengang_kz = et.studiengang_kz);
- ';
-
- if(!$db->db_query($qry))
- echo ' bis.tbl_entwicklungsteam '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Spalte bis.tbl_entwicklungsteam_id mit Werten aufgefüllt';
- }
-}
-
-//Create Sequence bis.tbl_entwicklungsteam and grant Rights
-if ($result = @$db->db_query("SELECT * FROM pg_class WHERE relname = 'tbl_entwicklungsteam_entwicklungsteam_id_seq'"))
-{
- if ($db->db_num_rows($result) == 0)
- {
- if ($count = @$db->db_query("SELECT * FROM bis.tbl_entwicklungsteam"))
- {
- $count = $db->db_num_rows($count) + 1;
- $qry = 'CREATE SEQUENCE bis.tbl_entwicklungsteam_entwicklungsteam_id_seq START ';
- $qry .= $count;
- if(!$db->db_query($qry))
- {
- echo ' bis.tbl_entwicklungsteam '.$db->db_last_error().'
';
- }
- else
- {
- echo '
bis.tbl_entwicklungsteam: Sequence bis.tbl_entwicklungsteam_entwicklungsteam_id_seq mit Startwert ' . $count . ' erstellt';
- $qry2 = "GRANT SELECT, UPDATE ON bis.tbl_entwicklungsteam_entwicklungsteam_id_seq TO vilesci;
- GRANT SELECT, UPDATE ON bis.tbl_entwicklungsteam_entwicklungsteam_id_seq TO web;";
- if(!$db->db_query($qry2))
- {
- echo 'bis.tbl_entwicklungsteam_entwicklungsteam_id_seqBerechtigungen: '.$db->db_last_error().'
';
- }
- else
- {
- echo '
bis.tbl_entwicklungsteam: Rechte auf bis.tbl_entwicklungsteam_entwicklungsteam_id_seq fuer web user und vilesci gesetzt ';
- }
- }
-
- }
- }
-}
-
-//Bis.tbl_entwicklungsteam auf NOTNULL setzen
-if ($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tbl_entwicklungsteam' AND column_name = 'entwicklungsteam_id' and is_nullable = 'NO'"))
-{
- if($db->db_num_rows($result)==0)
- {
- $qry = 'ALTER TABLE bis.tbl_entwicklungsteam ALTER COLUMN entwicklungsteam_id SET NOT NULL';
-
- if(!$db->db_query($qry))
- echo ' bis.tbl_entwicklungsteam '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Spalte bis.tbl_entwicklungsteam_id auf NOT NULL gesetzt';
- }
-}
-
-//Bis.tbl_entwicklungsteam DEFAULT einstellen
-if ($result = @$db->db_query("SELECT column_default FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tbl_entwicklungsteam'AND column_name = 'entwicklungsteam_id' and column_default is null"))
-{
- if($db->db_num_rows($result)==1)
- {
- $qry = "ALTER TABLE bis.tbl_entwicklungsteam ALTER COLUMN entwicklungsteam_id SET DEFAULT nextval('bis.tbl_entwicklungsteam_entwicklungsteam_id_seq'::regclass);";
-
- if(!$db->db_query($qry))
- echo ' bis.tbl_entwicklungsteam '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Defaultwert bei Spalte bis.tbl_entwicklungsteam_id gesetzt';
- }
-}
-
-//DELETE PRIMARY KEY pk_tbl_entwicklungsteam (mitarbeiter_uid, studiengang_kz) entfernen
-if ($result = @$db->db_query("SELECT * FROM pg_class WHERE relname='pk_tbl_entwicklungsteam'"))
-{
- if($db->db_num_rows($result)==1)
- {
- $qry = "DROP INDEX bis.pk_tbl_entwicklungsteam;";
-
- if (!$db->db_query($qry))
- echo 'bis.tbl_entwicklungsteam: '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Primary Key pk_tbl_entwicklungsteam (mitarbeiter_uid, studiengang_kz) entfernt ';
- }
-}
-
-
-// ADD PRIMARY KEY tbl_entwicklungsteam_pk to bis.tbl_entwicklungsteam
-if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'tbl_entwicklungsteam_pk'"))
-{
- if ($db->db_num_rows($result) == 0)
- {
- $qry = "ALTER TABLE bis.tbl_entwicklungsteam ADD CONSTRAINT tbl_entwicklungsteam_pk PRIMARY KEY(entwicklungsteam_id);";
-
- if (!$db->db_query($qry))
- echo 'sbis.tbl_entwicklungsteam: '.$db->db_last_error().'
';
- else
- echo '
bis.tbl_entwicklungsteam: Primary Key tbl_entwicklungsteam_pk (entwicklungsteam_id) hinzugefügt';
- }
-}
-
-
-
// Add table campus.tbl_zeitwunsch_gueltigkeit and migrate initial data
if($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_schema LIKE 'campus' AND table_name = 'tbl_zeitwunsch_gueltigkeit'"))
{