SLA - TypeError - Cannot read property 'response_time_in_minutes' of null

I have problem opening one incoming email (from inbox) which was marked as “SLA Customer”.
Actually this email address/company is not marked as SLA Customer, it’s save as SLA: None.

When I open this email (see link) I get:

TypeError: /opt/helpmonks/views/app/message.jade:99
   97| div(style='padding-top:10px;')
   98| div(class='sla-background')
 > 99| - var response_time = jadeFunctions.getTimeAmountInSelectedUnit(q_emailchain.sla.response_time_in_minutes, q_emailchain.sla.response_time_display_unit);
   100| .pull-left
   101| | #{__('sla')}: #{}
   102| if q_emailchain.sla.description

Cannot read property 'response_time_in_minutes' of null
   at eval (eval at <anonymous> (/opt/helpmonks/node_modules/jade/lib/index.js:216:8), <anonymous>:4472:79)
   at eval (eval at <anonymous> (/opt/helpmonks/node_modules/jade/lib/index.js:216:8), <anonymous>:6873:22)
   at res (/opt/helpmonks/node_modules/jade/lib/index.js:217:38)
   at Object.exports.renderFile (/opt/helpmonks/node_modules/jade/lib/index.js:360:38)
   at View.exports.renderFile [as engine] (/opt/helpmonks/node_modules/jade/lib/index.js:350:21)
   at View.render (/opt/helpmonks/node_modules/express/lib/view.js:93:8)
   at (/opt/helpmonks/node_modules/express/lib/application.js:530:10)
   at ServerResponse.res.render (/opt/helpmonks/node_modules/express/lib/response.js:933:7)
   at /opt/helpmonks/routes/app/emailchain_route.js:85:18
   at /opt/helpmonks/services/email_chain_service.js:190:6



We were able to view the message without problem. Does it work for you too now?

In any case, we see that there could be an issue with setting an SLA to a company with existing emails. We have now fixed this and will update the server later on today.

I’ve temporary switched on SLA for this sender as it was only way for me to open and read this email.

I’m still reproducing this bug when this Customer SLA is OFF.

Pls try again, if you can reproduce it (SLA for this customer is set to None):

We’ve patched the issue now and it works as expected.

Thank you for reporting this and making Helpmonks better.