Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2951 by pebblesb...@gmail.com: Comment from "Add comment" always shows first function name
http://code.google.com/p/reviewboard/issues/detail?id=2951

*** For customer support, please post to reviewbo...@googlegroups.com
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** Do not post confidential information in this bug report!

What version are you running?
Review Board 1.6.3

What's the URL of the page containing the problem?
http://www.example.com/r/XXX/diff

What steps will reproduce the problem?
1. Open a review in browser and go to Diff view.
2. Click on a line number to comment inside PHP class's function.
3. Add the comment and check the review.

What is the expected output? What do you see instead?
It should always give the actual function name as reference.

What operating system are you using? What browser?
Windows 7, Internet Explorer 9

Please provide any additional information below.
File reviewed is complete OO code file of PHP programming language. This is a new file created so the diff is from self only. The file contains namespace, class declaration with "extends" and interface "implements".
There are multiple functions in the class.

The problem seems to be that no matter on what function's line you comment on it will first function declaration as reference. And if you comment on first function then it will take class declaration as reference.

Something like his:

<?php

class myClass {

        public function __constrcut() {
                //      Do ABC
                //      Do XYZ
                //      Give 123
        }

        public funciton abc() {
                //      Do something

                //      Again do something

                //      Again do something
        }

        public function problem_is_here() {
                unset(self::$conn);
        }

}

?>

And if I put a comment on "unset(self::$conn);" It will give something like this:

function __construct() {
73              unset(self::$conn);


Attachments:
        review-board-problem.jpd.jpg  15.0 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to