Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Including collaborators on a ticket request







osTicket Versionv1.10 (901e5ea)
Up to date
Web Server Software Apache
MySQL Version 5.5.53
PHP Version 5.4.26

I'm trying to do something which I'm not sure is possible, but hopefully someone can at least point me to a possible solution.

We sometimes have cases where one user is submitting a ticket and needs to include another user as a collaborator. While I see where a collaborator can be added by the agent after submission, we would like the collaborator to be included at the time of the initial request.

I tried adding a custom variable (email-cc) to the request details form, and using that as a trigger for an email, but I can't figure out how to get that variable into the filter action form email field, or how to include any variables in the email subject or header. Those just come out as 'array'.

Any ideas of how to do this?

Tagged:

Comments

  • If the ticket is submitted via email, you can set it to include all CC as collaborators automatically.

    If you are talking about the web form, from the user and agent side, it is not possible to do that at this time in the UI. I have tried on the user side, separating email address with both a comma and a semicolon, but it rejects both as invalid. 
  • I am talking the web form. We've not set up the email submission process. I might have a look at doing that.
  • Please update your php to 5.6.x, v1.10 does not support anything lower. 
  • @blueyeguy is correct.  The only way to do that currently is to open the ticket using email.
  • When I look at the code in class.filter_action.php, it looks like there is a section that would allow variables such as %user and %recipients in the send email action.

    Specifically: lines 476- 500

    // Allow %{user} in the To: line
            $replacer = new VariableReplacer();
            $replacer->assign(array(
                'user' => sprintf('"%s" <%s>', $ticket['name'], $ticket['email'])
            ));
            $to = $replacer->replaceVars($config['recipients']);

            require_once PEAR_DIR . 'Mail/RFC822.php';
            require_once PEAR_DIR . 'PEAR.php';

            if (!($mails = Mail_RFC822::parseAddressList($to)) || PEAR::isError($mails))
                return false;

            // Allow %{recipient} in the body
            foreach ($mails as $R) {
                $recipient = sprintf('%s <%s@%s>', $R->personal, $R->mailbox, $R->host);
                $replacer->assign(array(
                    'recipient' => new EmailAddress($recipient),
                ));
                $I = $replacer->replaceVars($info);
                $mailer->send($recipient, $I['subject'], $I['message']);
            }

    But when I tried using those variables in the Send Email filter action, they didn't work. So can I use them, and if so how... or am I misunderstanding the function of this section? Or is this a bug?

    Thanks!
Sign In or Register to comment.