Lost password? | Help

[ advanced search ]

[UserJS] Receive emails from your bug reports

Forums » Opera Community » General Opera topics » User JavaScript

Go to last post

Thursday, 20. December 2007, 15:04:44

fearphage

Trained Swordsman of Unwanted Opera Termination

avatar

Posts: 2054

United Kingdom

[UserJS] Receive emails from your bug reports

Purpose:
  • OPTIONAL: Give us insight into Opera's bug tracking system.


  • Disclaimer:
    • I do not work for Opera.
    • This is not endorsed by Opera.
    • Your bug report will cross the interweb unencrypted
    • The destination script that sends the email is on my personal server
    • Your ip address will be sent in the email

    How it works:
    1. When you submit the form, this script stores all the form data in cookies for 60 seconds.
    2. On the next page (that says thanks for submitting a bug), it grabs the bug #
    3. It attaches the bug number to the data on the previous page
    4. It bundles this all together and tells my server to send an email to whatever email address you gave it.
    5. OPTIONAL: It logs your bug report in the Public Bug Tracking System. Thanks Remco


    Source of the server-side emailer script:
    <?
      header("Content-type: image/png");
      $to = $_REQUEST['to'];
      $from = $_REQUEST['from'];
      $message = str_replace(array("\\'", '\\"'), array("'",'"'), $_REQUEST['msg']);
      $bug = $_REQUEST['bug'] ? " #".$_REQUEST['bug'] : "";
      $title = $_REQUEST['title'] ? ": ".str_replace(array("\\'",'\\"'), array("'",'"'), $_REQUEST['title']) : "";
      if (strlen($to) && strlen($from) && strlen($message))
        mail("$to", "Bug Traq".$bug.$title, $message."\nSent from the following IP address: ".$_SERVER['REMOTE_ADDR'], "From: \"Opera Bug Report Wizard\" <$from>\r\nDate: ".date("r")."\r\n");
      readfile("arrowflip.png");
    ?>
    That's it. Just plain and simple.

    The Settings Explained:
      var defaultEmail = 'email-address@here.com' // the email address you would like filled in automatically in all reports
          ,notifyOnSucess = true // popup an alert after you submit each bug confirming the email was sent
          ,logToPublicBTS = false; // changing this to true will get your bugs logged to http://opera.remcol.ath.cx/bugs/ also
    /*
     * OPTIONAL parameters
     * These settings only apply to those that have logins for http://opera.remcol.ath.cx/bugs/
     * If you do not have a login you can still post your bugs to the Public BTS with no problems
     */
      var publicBTSUsername = false // if you're posting it to the public BTS and you have an account there, input your username here
         ,publicBTSKey = false; // the key that is linked to your username, you can find it on http://opera.remcol.ath.cx/bugs/index.php?action=profile

    Explanation:
    • defaultEmail: This will be automatically filled-in in the bug report each time. This is the email address that bug reports will be sent to. What this means is: For this script to work at all, you should change this value to one of your email addresses.
    • notifyOnSucess: Determine's whether you'd like the script to notify you if the email was sent successfully.
    • logToPublicBTS: if this is set to true, you will be helping the community gain insight into Opera's official Bug Tracking System (BTS). The public BTS is graviously hosted and coded by Remco. Feel free to check it out and look through the bug reports. Your email address is NOT sent to or visible from the Public BTS.
    • publicBTSUsername & publicBTSKey: These only apply to those who have logToPublicBTS set to true and have an account (Created by Remco)


    The Setup:
    • Download this file.
    • Read this for How to install instructions.
    • You will have to enabled this Opera setting for it to work.
    • Edit the email address to one of your own.
    • Recommended but optional: change the logToPublicBTS setting to true.


    Result
    Enjoy.

    Please report errors, bugs or suggestions about this script. Thank you.

    Friday, 21. December 2007, 17:37:03

    HaJotKE

    Grumbling Hyper-Critical Cantankerous Curmudgeon!

    avatar

    Banned User

    Germany

    Just stumbled about this script of yours, what a great idea... :up:

    Should have had this for years!

    M/B I will start filing BUGS again,
    didn't do that anymore in the last time, because there were too many in the last snapshots or alphas or betas or
    whatever they call this salami method of 'SW-development' creeping along in unknown directions... :lol:

    THANKS ALOT, however!

    Friday, 21. December 2007, 19:16:30

    FataL

    Opera freak

    avatar

    Posts: 1337

    USA

    Great idea!
    I have asked for e-mail copy of bug report many times already...

    Friday, 21. December 2007, 21:15:23

    Cool stuff :up:

    Is there a way to jump direct to the real bug id?
    e.g. index.php?action=bug&bugid=303059

    Friday, 21. December 2007, 22:47:02

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    Originally posted by DoubleT:

    Is there a way to jump direct to the real bug id?

    You want the script to redirect to the bug you just reported?

    Saturday, 22. December 2007, 08:20:14

    Originally posted by fearphage:

    You want the script to redirect to the bug you just reported?


    No, i am using AutoLink and want jump to the real bug id, if it's possible.

    Thursday, 24. January 2008, 05:52:06

    kyleabaker

    mr. kyleabaker

    avatar

    Posts: 189

    USA

    Great script! Thanks fearphage!

    Saturday, 2. February 2008, 23:35:05

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    Just a heads up, this is not working in the latest two builds. Its a timing issue and I'm working on it. You will still receive emails but the bugs aren't being added to the public db.

    There is an update in the works so let me clarify again:

    Originally posted by DoubleT:

    i am using AutoLink and want jump to the real bug id, if it's possible.

    You want to be redirected to your report in remco's db?

    Thursday, 14. February 2008, 20:33:15

    Originally posted by fearphage:

    Originally posted by DoubleT:

    i am using AutoLink and want jump to the real bug id, if it's possible.

    You want to be redirected to your report in remco's db?


    No, not only my bug ids! All ids shown in the DevBlog or OperaForum.
    The AutoLink script change something like bug #311659 or bug-311659 into a link pointing to the BTS entrie => https://bugzilla.mozilla.org/show_bug.cgi?id=311659. I want to replace the bugzilla link with remco's BTS, to jump direct to the report, if it is present. => http://opera.remcol.ath.cx/bugs/index.php?action=bug&bugid=311659

    Friday, 22. February 2008, 14:27:56

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    That is a good idea but it should be a different script I feel. I'd like to keep this script as small as possible and update it as little as possible. I'll work on that script this weekend.

    Wednesday, 12. March 2008, 15:48:35

    FataL

    Opera freak

    avatar

    Posts: 1337

    USA

    Is there any tread about Public Bug Tracking System? I would like to suggest some improvements...

    Wednesday, 12. March 2008, 22:35:03

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    @Fatal: feel free to start one. Put it in the Beta forums and don't forget to mention this script/thread :smile:

    I have some thoughts on the subject as well.

    Saturday, 15. March 2008, 12:34:39

    Originally posted by fearphage:

    That is a good idea but it should be a different script I feel.


    Err, you don't understand. You shouldn't change the script. AutoLink works fine. What i need is a parameter of the Opera bug number in the link (like &bugid=318361), to jump direct into the bug report on the BTS. Now i can only jump to a number given by the BTS (&id=412), but this is not the real bug id.

    Btw, is it possible to add the create date in the list view of the BTS?

    Saturday, 15. March 2008, 15:30:26

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    For a generic field, you want to use the 'q' param. It accepts bug numbers and keywords.
    http://opera.remcol.ath.cx/bugs/index.php?q=318361
    If only one match is found, you are taken to that bug.

    Saturday, 15. March 2008, 15:34:45

    remcolanting

    Long time Opera User

    avatar

    Posts: 122

    Netherlands

    You can use this:
    http://opera.remcol.ath.cx/bugs/?oid=######

    This works because of the filters that are implemented. More info about all get variables is in the "External interfaces" link in the footer of the bts. If there is only one hit, you are directed to the report instead of the list

    Thursday, 20. March 2008, 17:20:44

    FataL

    Opera freak

    avatar

    Posts: 1337

    USA

    @remcolanting: it would be useful to have these fields in table from original bug report:
    What kind of problem is this?
    Where is the problem?

    Friday, 21. March 2008, 22:23:59

    remcolanting

    Long time Opera User

    avatar

    Posts: 122

    Netherlands

    I think those fields are not really needed. The fields don't really add a lot of data while there is a lot of clutter added to the interface. All that information should be obvious from the report itself.

    Besides that, Opera's system uses a lot more options so a 1 on 1 mapping wouldn't be possible anyway (even if someone could get their hands on the data somehow)

    Friday, 21. March 2008, 22:48:43

    FataL

    Opera freak

    avatar

    Posts: 1337

    USA

    So, how can I filter out all M2 related bugs? Or, for example, I want to see only crash related issues...

    Saturday, 22. March 2008, 00:30:34

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    Originally posted by FataL:

    how can I filter out all M2 related bugs


    http://opera.remcol.ath.cx/bugs/index.php?q=mail*

    Originally posted by FataL:

    I want to see only crash related issues


    http://opera.remcol.ath.cx/bugs/index.php?q=crash*

    Saturday, 29. March 2008, 05:01:28

    Disco Stu

    avatar

    Posts: 59

    fearphage: A notification if the script fails to set the cookie would be nice, at the moment it silently fails if you have cookies disabled.

    Saturday, 26. April 2008, 08:04:30 (edited)

    your work is really exciting!
    https://bugs.opera.com/bugreport.cgi + bugtraq.js = almost unsurpassable :up: :D
    many thanks!

    in my first tries a week ago with build 1929 bugtraq.js reported an error and did not send mails to my own mailaddress, now it WORKS like a charm,
    don't know if it is the new build 1933, or if I didn't check cookie allowance in sitepreferences carefully enough

    in received mails I noticed plain text format of body, no encoding e.g. quoted printable
    for generating and mime-encoding of mails I use libphp-phpmailer, version 1.73-3 works perfectly for me, only 65 kB php-code, not so bloated as more advanced "modern" libraries for this task
    if you don't know it already: maybe interesting for you
    http://packages.debian.org/libphp-phpmailer
    :idea:

    Wednesday, 7. May 2008, 19:26:07 (edited)

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    To refrence a common issue:
     var publicBTSUsername = false // if you're posting it to the public BTS and you have an account there, input your username here
         ,publicBTSKey = false; // the key that is linked to your username, you can find it on http://opera.remcol.ath.cx/bugs/index.php?action=profile
    If you change either of these values, both of them must be strings. This means they should both be surrounded with single or double quotes.
    So for instance,this is the right way:
     var publicBTSUsername = 'fearphage'
         ,publicBTSKey = 'catpants';
    and to be fully clear, this is the WRONG way:
     var publicBTSUsername = fearphage
         ,publicBTSKey = catpants; 
    In slightly more detail, this would cause opera to look for the values of the variables fearphage and catpants.

    @discoStu: the best I can do is sent a message to the error console (opera.postError) because one major goal of the script is never to halt, delay or prevent bugs from being submitted. Any type of modal alert would defy that goal.

    Friday, 23. May 2008, 21:48:01

    The functionality provided by this script and by Remco's public bug tracking system has been sorely needed by that portion of the user community sufficiently motivated to make the effort to report bugs. The idea of plugging this gaping hole with a user script is brilliant, but the idea of providing feedback and allowing public access to the list of reported bugs certainly doesn't qualify as brilliant. Anyone with a 3-digit IQ should be capable of recognizing these needs of the user community which brings me to the point of this rant: Why have the folks at Opera Software been so obdurate in their refusal to address these legitimate needs of the user community?

    So :cheers: to fearphage and Remco for your much appreciated efforts and :coffee: to Opera Software for being comatose in addressing the needs of your users.

    Sunday, 1. June 2008, 22:09:37

    Thank you for your work on this.

    Saturday, 28. June 2008, 17:37:10

    friguron

    Frío y azul...

    avatar

    Posts: 440

    Spain

    At work, the user js works to report bugs (the appear in the unofficial board)
    At home, the user js (the very same one, with the same modifications) doesn't work, so I'm not keeping track of my uploaded bugs if I report from home! "why is that"? I hope at least these ones (the ones I'm sending from home) arrive to Opera developers...

    The user.js file seems to be used because opera pops up with the "do you want to use user.js files in this https page" ?
    Known fact? How to know if I'm posting the bugs to the unofficial board? I've set to "true" the variable which does this...

    Monday, 30. June 2008, 15:32:15

    Galileo

    Opera follower

    avatar

    Posts: 187

    Greece

    I have the same problem with the bug reports not showing up at remco's list, although i get the email. I'll download the useJS again.

    Monday, 30. June 2008, 15:58:59

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    Hmmmm...

    • Do either of you see errors in the error console (Tools > Advanced > Error Console) when it doesn't show up in the BTS?
    • Are you using a proxy?
    • Can you upload the exact userjs script you are using online somewhere? (REMOVE YOUR PASSWORD)

    Originally posted by friguron:

    I hope at least these ones (the ones I'm sending from home) arrive to Opera developers

    My script will NEVER prevent a bug from making it to opera's server EVER. That is a one major requirement I had for the script. When you see the page that gives you a bug numbber and says "thank you for submitting...", that means your bug made it into opera's official bts.

    Originally posted by friguron:

    The user.js file seems to be used because opera pops up with the "do you want to use user.js files in this https page"

    This doesn't necessarily mean it is loading this exact script unless it is the only one you are running. All other scripts would cause the same prompt.

    Tuesday, 1. July 2008, 13:27:53

    Galileo

    Opera follower

    avatar

    Posts: 187

    Greece


    Do either of you see errors in the error console (Tools > Advanced > Error Console) when it doesn't show up in the BTS?
    Are you using a proxy?
    Can you upload the exact userjs script you are using online somewhere? (REMOVE YOUR PASSWORD)


    When i fill a new bug report i'll take a look.
    No proxy.
    http://www.filefactory.com/file/c8a1b0/n/bugtraq_js

    Tuesday, 21. October 2008, 17:03:05

    Seems like they made some changes to the Bug Report Wizard. Not only is it assigning different and much lower bug numbers now (I just submitted one and it received number "DSK-237633"), but I also did not receive an e-mail and it also wasn't added to Remco's BTS.

    Tuesday, 21. October 2008, 17:53:50

    remcolanting

    Long time Opera User

    avatar

    Posts: 122

    Netherlands

    The bug made it to my server, but the second request that is needed to set the bugnumber didn't make it. My guess is that the script doesn't detect the bugnumber correctly.

    Besides that, my db needs updating because the bugnumbers now also include a prefix :frown:

    Wednesday, 22. October 2008, 18:32:50

    xErath

    javascript guru

    avatar

    Posts: 6442

    Norway

    Opera Software

    Originally posted by remcolanting:

    Besides that, my db needs updating because the bugnumbers now also include a prefix


    Just change column type to varchar

    Wednesday, 22. October 2008, 18:57:19

    FataL

    Opera freak

    avatar

    Posts: 1337

    USA

    Guys, please leave some comment here when public DB and supportive UserJS will work with new BTS.
    Thanks!
    P.S. maybe it's the rigth time for me to ask for account on Remco's Public BTS... :wink:

    Wednesday, 22. October 2008, 23:40:45

    Incidentally the script, or the database, or some combination of both has a problem with certain escaped characters.

    In Bug 367530 I submitted the following six regular expressions:
    flickr\.com\/services
    flickr\.com\/services\/
    flickr\.com/services
    flickr\.com/services/
    flickr\.com\/
    flickr\.com/
    In the bug database the escaped slashes (see Remco's comment[1]) are gone.

    And for reference in my email copy I got the following:
    flickr\\.com\\/services
    flickr\\.com\\/services\\/
    flickr\\.com/services
    flickr\\.com/services/
    flickr\\.com\\/
    flickr\\.com/
    [1] Whether slashes need to be escaped (backslashes always need to be escaped) varies somewhat depending on the RE engine being used and other circumstances, I only did so in the bug report to eliminate them as a cause. Regardless all six expressions work when Opera is forced to recheck existing mail, meaning there's still a bug even if my regular expressions could be more robust (the actual string I want to use is longer still, but those serve better as a test case.)

    Thursday, 23. October 2008, 15:14:31

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    After reporting a bug, what is the url of the new landing page?

    Thursday, 23. October 2008, 16:45:11

    URL in the address bar doesn't change after submitting the bug report.

    Thursday, 23. October 2008, 17:37:02

    remcolanting

    Long time Opera User

    avatar

    Posts: 122

    Netherlands

    My bts has been updated to handle the prefix-number way. The prefix is not shown on the list, but it shows in the details and the edit page. It's also sorted against.

    Now to hope I didn't make any mistakes implementing it :wink:

    Thursday, 23. October 2008, 18:46:08

    Unfortunately the sorting doesn't seem to work properly. The new DSK bug numbers aren't listed as the newest ones.

    Thursday, 23. October 2008, 19:56:34

    remcolanting

    Long time Opera User

    avatar

    Posts: 122

    Netherlands

    Grr, that's because of the prefix. It was set at bts2 which comes before dsk. I set it to odsk to fix.

    Wednesday, 29. October 2008, 15:36:31

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    bugtraq updated and functional. (tested exactly once :smile:) I got the email and it appeared in remco's db.

    Update now

    Don't forget to update your email address and change logToPublicBTS to true (line 14). Thank you all for your participation.

    Thursday, 4. December 2008, 20:30:22

    I didn't understand it very well.
    When i send a bug by the Opera Bug Report Wizard I will be emailed back telling me about changes onto my bug?
    And what is the Public BTS? An unofficial page to see info about Official Opera Bugs? Like a hack to see their listing? hehe


    Anyway, very good idea, if its what im thinking =D
    Already installed and will use asap, cos im workin but i found SO MUCH bugs in this new 10alpha.

    Monday, 23. February 2009, 17:01:52

    Philee

    avatar

    Posts: 187

    I recently always get an error saying: There was an error submitting your email request.
    Anyone else having problems receiving the bug reports per email?

    Tuesday, 24. February 2009, 04:55:28

    fearphage

    Trained Swordsman of Unwanted Opera Termination

    avatar

    Posts: 2054

    United Kingdom

    Originally posted by Philee:

    I recently always get an error saying: There was an error submitting your email request.

    How long has this been happening? I just submitted a bug and everything silently failed.

    Tuesday, 24. February 2009, 15:02:09

    Philee

    avatar

    Posts: 187

    I'm not sure. I think the last three times didn't work.
    I also changed the mail address from .ru to a hotmail address but that didn't help.

    Could you check my script?

    Thank you

    Thursday, 5. March 2009, 16:48:08

    Philee

    avatar

    Posts: 187

    I still have the problem.
    Another bug report submitted with the same error message.
    This time I removed all other scripts to be sure that they don't interfere.
    Unfortunately without success.

    Tuesday, 17. March 2009, 21:59:13

    Zotlan

    ExtendOpera admin

    avatar

    Posts: 2275

    Netherlands

    Just found out about this, very interesting project.
    *downloads JS*

    Thursday, 26. March 2009, 16:11:27

    Philee

    avatar

    Posts: 187

    I just submitted a bug report and this time I got a copy of the report from Opera itself.

    Dear Opera User,

    This is to acknowledge that we have received your bug report, with the ID:
    DSK-2xxxxx. You may wish to keep this ID for future reference.

    All bug reports are read and handled by our staff. However, please note
    that you will not receive a personal reply to the bug report, unless we
    need more information to investigate the bug.

    We are not able to respond to questions and queries through the bug
    tracking system. To get help with Opera, please visit
    http://www.opera.com/support/.

    You can use this e-mail address (or reply to this e-mail) to update your
    report with more information, such as screenshots, crash logs, code
    examples, and so on:

    DSK-2xxxxx@bugs.opera.com.

    This is the information you submitted to us:



    That's great!
    The JS still isn't working for me. The only purpose for me now is the feature to log it ot the public tracker.

    Thursday, 26. March 2009, 16:33:17

    Philee

    avatar

    Posts: 187

    Thanks for the link!
    That's good news!

    Forums » Opera Community » General Opera topics » User JavaScript