Email output could be much prettier

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Yay! It's working now. Okay now that I'm getting the correct output I can start to really test it...will post issues as I find them. Thanks again!
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

So still getting errors from bad index, so I added "@" in front of those variables to hide the error...although a bad index sounds important to not just ignore lol.

$variables['severity'] = get_enum_element( 'severity', $issue_data['email_severity'], auth_get_current_user_id(), @$issue_data['project_id'] );
$variables['status'] = get_enum_element( 'status', $issue_data['email_status'], auth_get_current_user_id(), @$issue_data['project_id'] );
$variables['priority'] =get_enum_element( 'priority', $issue_data['email_priority'], auth_get_current_user_id(),@$issue_data['project_id'] );
$variables['tags'] = @$issue_data['email_tag'];
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Yeah not able to use it, now entering a new issue gets me this error:

SYSTEM NOTICE

'Undefined index: email_due_date' in 'C:\MantisBT2243\core\template_api.php' line 24

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

Change error reporting to Error only, it will remove the system notices. That way you can continue. I will review these notices later :mrgreen:
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

Got it. DISPLAY_ERROR_NONE

Thanks. Everything seems to be working fine. Made a few changes to the CSS but otherwise I removed all "@" in front of variables since errors are now ignored. Hope that doesn't bite me in the butt.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

No it will not for now. I will change my setup to display all messages and will fix them somewhere this week. Then I will post version 3 :D
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

if you open up my bug_mailtemplate.html, you can remove the comment tags on line 76 and 80.
Next you will get additional information in the overview:
- The array that holds all data
- The referer from which the script is called.

Most of the index errors you mention, I cannot reproduce. Due_date, Project_id etcetera are normal valid fields which should be present in the array.
Please check and let me know what you find.
mushu
Posts: 184
Joined: 04 Jan 2017, 17:41

Re: Email output could be much prettier

Post by mushu »

referrer = /bug_report_page.php

all history = Date Username What Change
2020-10-26 13:41 usr1 New Issue
2020-10-26 13:41 usr1 Status new => assigned
2020-10-26 13:41 usr1 Assigned To => usr1

But of course this is still ignoring errors using the constant above.
Last edited by mushu on 26 Oct 2020, 20:53, edited 1 time in total.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

Re: Email output could be much prettier

Post by cas »

You have activated 3 lines, most interesting is the last one. This print the array with all available data.
Post Reply