From 543e4a8fedce5025264d578d488c4502530229a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 6 Dec 2017 08:03:33 +0100 Subject: [PATCH] =?UTF-8?q?TicketIDs=20k=C3=B6nnen=20im=20Jahresplan=20mit?= =?UTF-8?q?=20#1234=20verlinkt=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jahresplan/jahresplan_funktionen.inc.php | 17 +++++++++++++++++ config/cis.config-default.inc.php | 3 +++ 2 files changed, 20 insertions(+) diff --git a/cis/private/jahresplan/jahresplan_funktionen.inc.php b/cis/private/jahresplan/jahresplan_funktionen.inc.php index 72277f22b..a2b8699c4 100644 --- a/cis/private/jahresplan/jahresplan_funktionen.inc.php +++ b/cis/private/jahresplan/jahresplan_funktionen.inc.php @@ -1100,6 +1100,7 @@ function jahresplan_date_to_timestamp($string="") function printlinks($text) { + // Volle Links $pattern = '~[a-z]+://\S+~'; if($num_found = preg_match_all($pattern, $text, $out)) @@ -1109,5 +1110,21 @@ function printlinks($text) echo ''.$link.'
'; } } + + if(defined('JAHRESPLAN_TICKET_LINK')) + { + // TicketsIds mit #1234 + $pattern = '~\#[0-9]+~'; + + if($num_found = preg_match_all($pattern, $text, $out)) + { + foreach($out[0] as $ticketnr) + { + $id = mb_substr($ticketnr,1); + $link = JAHRESPLAN_TICKET_LINK.$id; + echo ''.$link.'
'; + } + } + } } ?> diff --git a/config/cis.config-default.inc.php b/config/cis.config-default.inc.php index 49af7cdd6..063518284 100644 --- a/config/cis.config-default.inc.php +++ b/config/cis.config-default.inc.php @@ -232,4 +232,7 @@ define('CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN', serialize(array("Studiengebuehr"))) //Gibt an bei welcher Länge die LV-Bezeichnungen im Menü abgeschnitten werden. Default: 21 define('CIS_LVMENUE_CUTLENGTH', 21); + +// Gibt an, auf welche Seite TicketIds ala #1234 im Jahresplan verlinkt werden zB zur Verlinkung in Bugtracker +define('JAHRESPLAN_TICKET_LINK','https://bug.technikum-wien.at/otrs/index.pl?Action=AgentTicketZoom;TicketID='); ?>