[Intégré 3.2.0] nom du demandeur dans le mail

Décrivez les améliorations que vous souhaiteriez pour les prochaines versions.
Répondre
fabrice
Gsup LEVEL 7
Messages : 327
Enregistré le : mar. 11 mars 2014 12:01

Bonjour,
est il possible d'avoir le nom du demandeur dans le mail reçu par les techniciens : "le ticket n°XXX vous à été attribué ...."
à ce jour il y a Objet et description
cordialement Fabrice
OS : Linux gestsup 4.15.0-158-generic #166-Ubuntu SMP Fri Sep 17 19:37:52 UTC 2021 x86_64
MariaDB : 10.4.21-MariaDB-1:10.4.21+maria~bionic (base : bsup 183.8MB)
PHP : 7.3.30-1+ubuntu18.04.1+deb.sury.org+1
GestSup : 3.2.15 (8871 Tickets)
fabrice
Gsup LEVEL 7
Messages : 327
Enregistré le : mar. 11 mars 2014 12:01

bonjour,
personne n'a d'idée ?
OS : Linux gestsup 4.15.0-158-generic #166-Ubuntu SMP Fri Sep 17 19:37:52 UTC 2021 x86_64
MariaDB : 10.4.21-MariaDB-1:10.4.21+maria~bionic (base : bsup 183.8MB)
PHP : 7.3.30-1+ubuntu18.04.1+deb.sury.org+1
GestSup : 3.2.15 (8871 Tickets)
fabrice
Gsup LEVEL 7
Messages : 327
Enregistré le : mar. 11 mars 2014 12:01

Bonjour,
je remonte le sujet si quelqu'un à une idée
OS : Linux gestsup 4.15.0-158-generic #166-Ubuntu SMP Fri Sep 17 19:37:52 UTC 2021 x86_64
MariaDB : 10.4.21-MariaDB-1:10.4.21+maria~bionic (base : bsup 183.8MB)
PHP : 7.3.30-1+ubuntu18.04.1+deb.sury.org+1
GestSup : 3.2.15 (8871 Tickets)
fabrice
Gsup LEVEL 7
Messages : 327
Enregistré le : mar. 11 mars 2014 12:01

Bonjour,
j'ai trouvé une solution en modifiant le fichier /core/auto_mail.php comme ceci :

Code : Tout sélectionner

//case send auto mail to tech when technician attribution
if(($rparameters['mail_auto_tech_attribution']==1) && (($_POST['send'] || $_POST['modify'] || $_POST['quit']) && (($globalrow['technician']!=$_POST['technician']) || ($t_group)) && ($_POST['technician']!=$_SESSION['user_id'])))
{
	//debug
	if($rparameters['debug']==1) {echo "<b>AUTO MAIL DETECT:</b>  FROM system TO tech  (Reason: mail_auto_tech_attribution ticket technician attribution is detected)<br> ";}
	
		if($rparameters['mail_from_adr']){$from=$rparameters['mail_from_adr'];} else {$from=$ruser['mail'];}
		
		//technician group detection
		if($t_group) 
		{
			$to='';
			//check group change or attribution
			if($t_group!=$globalrow['t_group'])
			{
				$qry2=$db->prepare("SELECT `tusers`.mail FROM `tusers`,`tgroups_assoc` WHERE `tusers`.id=`tgroups_assoc`.user and `tgroups_assoc`.group=:group");
				$qry2->execute(array('group' => $t_group));
				while($row2=$qry2->fetch()) {$to.=$row2['mail'].';';}
				$qry2->closeCursor();
			} 
		} else {
			//get tech mail 
			$qry = $db->prepare("SELECT * FROM tusers WHERE id=:id");
			$qry->execute(array('id' => $_POST['technician']));
			$techrow=$qry->fetch();
			$qry->closeCursor();
			$to=$techrow['mail'];
		}
        //find user name
        $qry = $db->prepare("SELECT * FROM tusers WHERE id=:id");
        $qry->execute(array('id' => $uid));
        $userrow=$qry->fetch();
        $qry->closeCursor();
		
		//check if tech have mail
		if($to) 
		{
			$object=T_('Le ticket').' n°'.$_GET['id'].': '.$_POST['title'].' '.T_('vous a été attribué');
			//remove single quote in post data
			$description = str_replace("'", "", $_POST['description']);
			$title = str_replace("'", "", $_POST['title']);
			$message = '
			'.T_('Le ticket').' n°'.$_GET['id'].' '.T_('a été déclaré par l\'utilisateur').' '.$userrow['lastname'].' '.$userrow['firstname'].'. <br />
			<br />
			<u>'.T_('Objet').':</u><br />
			'.$title.'<br />		
			<br />	
			<u>'.T_('Description').':</u><br />
			'.$description.'<br />
			<br />
			'.T_('Pour plus d\'informations vous pouvez consulter le ticket sur').' <a href="'.$rparameters['server_url'].'/index.php?page=ticket&id='.$_GET['id'].'">'.$rparameters['server_url'].'/index.php?page=ticket&id='.$_GET['id'].'</a>.
			';
			$mail_auto=true;
			require('./core/message.php');
		} else {if($rparameters['debug']==1) {echo "technician mail is empty or no technician associated or tech group no change on this ticket";}}

}
OS : Linux gestsup 4.15.0-158-generic #166-Ubuntu SMP Fri Sep 17 19:37:52 UTC 2021 x86_64
MariaDB : 10.4.21-MariaDB-1:10.4.21+maria~bionic (base : bsup 183.8MB)
PHP : 7.3.30-1+ubuntu18.04.1+deb.sury.org+1
GestSup : 3.2.15 (8871 Tickets)
Avatar du membre
Flox
Administrateur du site
Messages : 8973
Enregistré le : jeu. 21 juin 2012 19:00

Bonjour,

la fonctionnalité à été intégrée dans la version 3.2.0.

Cdt
GestSup: 3.2.47 | Debian: 12 | Apache: 2.4.58 | MariaDB: 11.3.2 | PHP: 8.3.4 | https://doc.gestsup.fr/
Répondre