fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16865] more on helpdesk


From: sigurdne
Subject: [Fmsystem-commits] [16865] more on helpdesk
Date: Tue, 13 Jun 2017 12:05:18 -0400 (EDT)

Revision: 16865
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16865
Author:   sigurdne
Date:     2017-06-13 12:05:18 -0400 (Tue, 13 Jun 2017)
Log Message:
-----------
more on helpdesk

Modified Paths:
--------------
    trunk/helpdesk/inc/class.botts.inc.php
    trunk/helpdesk/inc/class.menu.inc.php
    trunk/helpdesk/inc/class.sogeneric.inc.php
    trunk/helpdesk/inc/class.sotts.inc.php
    trunk/helpdesk/setup/phpgw_no.lang
    trunk/helpdesk/templates/base/config.tpl

Modified: trunk/helpdesk/inc/class.botts.inc.php
===================================================================
--- trunk/helpdesk/inc/class.botts.inc.php      2017-06-13 09:41:38 UTC (rev 
16864)
+++ trunk/helpdesk/inc/class.botts.inc.php      2017-06-13 16:05:18 UTC (rev 
16865)
@@ -127,6 +127,11 @@
                                'id' => 'assignedto',
                                'name' => lang('assigned to')
                        );
+                       $columns['category'] = array
+                               (
+                               'id' => 'category',
+                               'name' => lang('category')
+                       );
 
                        $columns['billable_hours'] = array(
                                'id' => 'billable_hours',
@@ -211,7 +216,7 @@
                        return $this->bocommon->select_list($selected,$filters);
                }
 
-               function get_status_list($selected)
+               function get_status_list($selected = '')
                {
                        $status = $this->_get_status_list();
                        return $this->bocommon->select_list($selected,$status);
@@ -770,6 +775,12 @@
 
                function mail_ticket($id, $fields_updated, $receipt = array(), 
$get_message = false)
                {
+                       //No message on assignment
+                       if(!$get_message && is_array($fields_updated) && 
count($fields_updated) == 1 && in_array('assignedto', $fields_updated))
+                       {
+                               return;
+                       }
+
                        $log_recipients = array();
                        $this->send                     = 
CreateObject('phpgwapi.send');
 
@@ -819,12 +830,40 @@
                        $link_text = lang('Ticket') . ' #' . $id ;
 
                        $messages_sendt = 
$this->historylog->return_array(array(),array('M'),'history_timestamp','DESC',$id);
+                       $additional_notes = $this->read_additional_notes($id);
+                       $num_updates = count($additional_notes) +1;
 
+                       //New message
+                       if(!$get_message && 
!empty($this->config->config_data['new_message']))
+                       {
+                               $link_text = 
"<H2>{$this->config->config_data['new_message']}</H2>";
+                               $link_text = nl2br(str_replace(array('__ID__'), 
array($id, $num_updates), $link_text));
+                       }
+
+                       // Normal update message
                        if(!$get_message && 
!empty($this->config->config_data['update_message']) && $messages_sendt)
                        {
                                $link_text = 
"<H2>{$this->config->config_data['update_message']}</H2>";
+                               $link_text = nl2br(str_replace(array('__ID__', 
'__#__'), array($id, $num_updates), $link_text));
                        }
 
+                       $status_closed = array('X' => true);
+                       $custom_status  = $this->so->get_custom_status();
+                       foreach($custom_status as $custom)
+                       {
+                               $status_closed["C{$custom['id']}"] = 
!!$custom['closed'];
+                       }
+
+
+                       //Message when ticket is closed
+                       if(!$get_message && 
!empty($this->config->config_data['close_message']) && 
$status_closed[$ticket['status']])
+                       {
+                               $link_text = 
"<H4>{$this->config->config_data['close_message']}</H4>";
+                               $link_text = nl2br(str_replace(array('__ID__', 
'__#__'), array($id, $num_updates), $link_text));
+                       }
+
+                       //message when closed;
+
                        $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'helpdesk.uitts.view',
                                        'id' => $id), false, true) . '">' . 
$link_text . '</a>' . "\n";
 
@@ -910,9 +949,6 @@
 
                                $table_content .= 
"<tr><td>{$i}</td><td>{$entry_date}</td><td>{$user_name}</td><td>{$ticket['details']}</td></tr>";
 
-
-                               $additional_notes = 
$this->read_additional_notes($id);
-
                                foreach ($additional_notes as $value)
                                {
                                        $table_content .= 
"<tr><td>{$value['value_count']}</td><td>{$value['value_date']}</td><td>{$value['value_user']}</td><td>{$value['value_note']}</td></tr>";

Modified: trunk/helpdesk/inc/class.menu.inc.php
===================================================================
--- trunk/helpdesk/inc/class.menu.inc.php       2017-06-13 09:41:38 UTC (rev 
16864)
+++ trunk/helpdesk/inc/class.menu.inc.php       2017-06-13 16:05:18 UTC (rev 
16865)
@@ -174,7 +174,7 @@
                                                                'type' => 
'email_template', 'admin' => true))
                                                ),
                                                'recipient_set' => array(
-                                                       'text' => 
lang('recipient set'),
+                                                       'text' => lang('admin 
recipient set'),
                                                        'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'helpdesk.uigeneric.index',
                                                                'type' => 
'email_recipient_set', 'admin' => true))
                                                ),

Modified: trunk/helpdesk/inc/class.sogeneric.inc.php
===================================================================
--- trunk/helpdesk/inc/class.sogeneric.inc.php  2017-06-13 09:41:38 UTC (rev 
16864)
+++ trunk/helpdesk/inc/class.sogeneric.inc.php  2017-06-13 16:05:18 UTC (rev 
16865)
@@ -228,7 +228,7 @@
                                                ),
                                                'edit_msg' => lang('edit'),
                                                'add_msg' => lang('add'),
-                                               'name' => lang('recipient set'),
+                                               'name' => lang('admin recipient 
set'),
                                                'acl_app' => 'helpdesk',
                                                'system_location' => 
'.email_out.recipient_set',
                                                'acl_location' => '.email_out',

Modified: trunk/helpdesk/inc/class.sotts.inc.php
===================================================================
--- trunk/helpdesk/inc/class.sotts.inc.php      2017-06-13 09:41:38 UTC (rev 
16864)
+++ trunk/helpdesk/inc/class.sotts.inc.php      2017-06-13 16:05:18 UTC (rev 
16865)
@@ -662,7 +662,8 @@
                                        (
                                                'id'    => $this->db->f('id'),
                                                'name'  => $this->db->f('name', 
true),
-                                               'color' => $this->db->f('color')
+                                               'color' => 
$this->db->f('color'),
+                                               'closed'=> 
$this->db->f('color'),
                                        );
                        }
                        return $status;

Modified: trunk/helpdesk/setup/phpgw_no.lang
===================================================================
--- trunk/helpdesk/setup/phpgw_no.lang  2017-06-13 09:41:38 UTC (rev 16864)
+++ trunk/helpdesk/setup/phpgw_no.lang  2017-06-13 16:05:18 UTC (rev 16865)
@@ -193,7 +193,7 @@
 select all     helpdesk        no      Velg alle
 planned        helpdesk        no      Planlagt
 email template helpdesk        no      Standardtekster
-recipient set  helpdesk        no      mottaker sett
+admin recipient set    helpdesk        no      Admin mottakerlister
 list   helpdesk        no      List
 recipient list helpdesk        no      Mottaker liste
 select helpdesk        no      Velg
@@ -202,7 +202,9 @@
 generic        helpdesk        no      Generelt
 reverse        helpdesk        no      Revers tildeling
 owned by       helpdesk        no      Eies av
-update message helpdesk        no      Oppdateringsmelding
+new message    helpdesk        no      Svarmelding ved ny sak
+update message helpdesk        no      Svarmelding ved oppdatert sak
+close message  helpdesk        no      Svarmelding ved avlsuttet sak
 list %1        helpdesk        no      List %1
 public helpdesk        no      synlig for alle
 open edit in new window        helpdesk        no      Editer i nytt vindu
\ No newline at end of file

Modified: trunk/helpdesk/templates/base/config.tpl
===================================================================
--- trunk/helpdesk/templates/base/config.tpl    2017-06-13 09:41:38 UTC (rev 
16864)
+++ trunk/helpdesk/templates/base/config.tpl    2017-06-13 16:05:18 UTC (rev 
16865)
@@ -20,10 +20,19 @@
                        <td><input name="newsettings[app_name]" 
value="{value_app_name}"></td>
                </tr>
                <tr>
-                       <td>{lang_update_message}: </td>
+                       <td>{lang_new_message}:</br> '__ID__' </td>
+                       <td><input name="newsettings[new_message]" 
value="{value_new_message}"></td>
+               </tr>
+               <tr>
+                       <td>{lang_update_message}:</br> '__ID__', '__#__' </td>
                        <td><input name="newsettings[update_message]" 
value="{value_update_message}"></td>
                </tr>
                <tr>
+                       <td>{lang_close_message}:</br> '__ID__', '__#__'</td>
+                       <td><input name="newsettings[close_message]" 
value="{value_close_message}"></td>
+               </tr>
+
+               <tr>
                        <td>{lang_from_email}: <br>
                        <td><input name="newsettings[from_email]" 
value="{value_from_email}"></td>
                </tr>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]