HTTP send method uploads bug report via HTTP protocol to web server. It uses HTTP POST method. I.e. it's very similar to filling a form on web page and clicking on "Submit" button. In order to work, this method requires special script on web server side, which will receive bug reports.
During HTTP send, EurekaLog sends bug report and additional files (if specified) as standard upload. For example, you can use the following PHP script, which uses standard $_FILES array to process uploaded files:
You can place this code to .php file (like upload.php) and place this file to your web server (like http://example.com/upload.php), and then specify this URL in HTTP send options (without "http://").
Warning: be sure to setup adequate maximum upload file limits in your web-server/script configuration. Otherwise sending may fail on large bug reports.
You can also provide additional data via OnCustomWebFieldsRequest event handler. For example, assign such event hanlder:
uses begin
Then, you can access your new "Application" field from your script. For PHP it will be $_REQUEST["Application"] or $_POST["Application"].
You don't have to use PHP. You can use script on any other scripting language (like ASP.NET). The above code is just simple example. The point is that such upload is standard file upload, there is no default functionality to handle it, so you need to write some code to handle it. How you do that, what amount of work you'll do - it's up to you.
See also examples below for more advanced script usage.
Advantages:
Drawbacks:
Currently EurekaLog supports only HTTP Basic-AUTH (basic access authentication) authentication method.
You can test any of your scripts by using HTML page on your web server (say, test.htm file):
(of course, you must replace "upload.php" with your data; you don't have to place this page on web server, you can run it locally - in this case action parameter will be like this: action="http://example.com/upload.php")
You can also add some debugging output to your scripts. For example (this is modified example of the PHP script above):
Just don't forget to remove debug code before real using!
It's also possible to get a feedback from upload script. Script can set custom message to show and upload status (like "OK", "error" and "bug fixed"). It's done by generating a HTML output with special tags. Currently, EurekaLog supports only 2 tags out-of-the-box: EurekaLogStatus and EurekaLogReply. To use these tag, you must generate a HTML in your script like this:
And you can add these two tags in any place inside this HTML. You can enclose these tags in comments to prevent them from appearing in HTML itself, for example:
EurekaLogStatus tag must contain an integer value, which represents operation status (TSendResult type). Most typically used values are srSent, srBugClosed, srInvalidInsert and srUnknownError. srSent and srBugClosed are considered as success status. All other codes are considered as failure. If this tag isn't used, the srSent is the default.
Note: it's important to use numeric value (like, '0', '1', '$1'), not name itself (like 'srSent').
You can use this tag to alter status of sending, but usually you omit this tag.
EurekaLogReply tag contains arbitrary string, which will be used as custom message, describing the operation. If this tag isn't used, the message will be empty. If status of the operation is the success (srSent or srBugClosed), then this message will appear in SuccessMessage field of TResponse record. If status is failure - message will appear in ErrorMessage field.
Alternatively, you can insert a http:// or https:// link into message. In this case EurekaLog will open a web-browser for this link without showing any other message. Showing HTML page can be used to present "pretty" message, detailed instructions or other advanced messages. For example, if "bug" is not a bug in your software, but problem in run-time configuration, you can insert the URL to your knowledge base article, which describes solution. Another example - you can't solve bug with existing bug report's information. Thus, you close bug and use an URL to web-page, where you ask user to submit more information.
For example:
See also: customizing feedback.
Note: remember - you don't have to use PHP. PHP is selected only as example language. You can write receiver-script in any language: ASP, .NET, (Win)CGI, etc. Just handle the standard file uploads and return some HTML page. That's all.
For example, you can use FogBugz anonymous report page as HTTP form to receive EurekaLog reports. You can also use Jira's issue collector.
Constant: wsmHTTP.
See also:
|