Blank Case number on Outgoing email

I am testing a fresh install of SuiteCRM 7.9.8 on Ubuntu 16.04.

When I send an email to my test support address, the case it being created correctly.

When the We’ve received your case message is sent out, the case number is blank.

Subject: Another Case [CASE: ]
========== Please reply above this line ==========
Hi Sally Johnson,

We’ve received your case Another Case (# ) on 2017-12-21 16:05:01

Status New
Reference
Description
Let’s try another case with this to see if I get the case number.

I am using the email template that came with the install. I just seems like the email is being send before the issue number has been created. Is this possible?

Maybe you’re getting this bug here?

https://github.com/salesagility/SuiteCRM/pull/4745/files

Try applying those changes manually to see if it fixes things:

https://github.com/salesagility/SuiteCRM/pull/4745/files

or wait for the next release if you’re not confortable editing code.

Thank you for your suggestion.

I am completely comfortable making changes to code. Thank you.

I made the changes to the 2 files. I restarted apache (not sure if that was required). I still have a blank case number on the initial email.

Ok… so I can’t really remember the answer to your issue, but I do remember seeing a couple of different things here on the forums about this, quite recently.

  • one is that for some reason case variables sometimes need an “a” before, like using $acasenumber instead of just $casenumber

  • the other is that perhaps the Case_number variable is simply forgotten when assigning the variables to the template, like here:

https://suitecrm.com/forum/installation-upgrade-help/16959-add-case-number-to-case-assignment-email

I did a search before I wrote. I only found someone under the feedback, but no one answered.

Again, I am using the out of the box template. I have attached the screen shot of the email template.

I also created a new template to test. Everything is working except for the case number.

I am using office 365 as my smtp server. I will try an internal smtp server to see if this solves the issue.

Have you tried that fix that mikebeck suggests on the thread I linked? It seems to work.

I’m not sure we are talking about the same thing.

If I understand correctly, en_us.notify_template.html are the notifications we as internal staff receive when a case (or anything, really) is assigned to us.

While I see it is missing the case number from en_us.notify_template.html, and adding the new link to Case.php would add the variable CASE_NUMBER, this does not solve the problem I am having.

The problem I am having is that when an external customer writes us an email, the response back to them does not have the case number in the subject line and in the message. The variable $acase_case_number is on the template, it is just not being populated.

You’re right, it’s a different thing, sorry. However, I do expect the mechanism used to be the same - those xtpl templates that need you to assign variables.

I don’t have time now for many investigations but see if you can make anything from this search… at least these are points in the code that mention Cases, Email, and variables :slight_smile:


$ see xtpl | grep assign | grep -i case
/var/www/html/modules/InboundEmail/EditView.php:366:$xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle);
/var/www/html/modules/InboundEmail/EditView.php:367:$xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, $create_case_email_template));
/var/www/html/modules/InboundEmail/EditView.php:369:    $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE","visibility:inline");
/var/www/html/modules/InboundEmail/EditView.php:371:    $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE","visibility:hidden");
/var/www/html/modules/InboundEmail/EditView.php:419:    $xtpl->assign("IS_CREATE_CASE", 'checked');
/var/www/html/modules/InboundEmail/DetailView.php:253:$xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle);
/var/www/html/modules/InboundEmail/DetailView.php:255:$xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE', $create_case_email_template_name);
/var/www/html/modules/InboundEmail/DetailView.php:276:$xtpl->assign('IS_CREATE_CASE', $is_create_case);