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

New issue 3205 by dtsch...@vizrt.com: Closing review request does not add the optional submission text to the ChangeDescription python instance.
http://code.google.com/p/reviewboard/issues/detail?id=3205

What version are you running?
RB 1.7.18

What's the URL of the page containing the problem?
/r/X/

What steps will reproduce the problem?
1.Create new review request.
2.Click on Close->Submitted
3.Enter some text in the edit field below "Describe the submission (optional):"
4.Click on "OK"

What is the expected output? What do you see instead?
I expect that the text entered in the edit field is added as a description to the ChangeDescription instance so that it can be retrieved on callbacks.

When I added some simple debugging logs, I see that no text is attached:

- reviewboard/reviews/models.py:

class ReviewRequest(BaseReviewRequestDetails):
...
    def close(self, type, user=None, description=None):
...
about line 830:
        if type not in [self.SUBMITTED, self.DISCARDED]:
            raise AttributeError("%s is not a valid close type" % type)

        if self.status != type:
changedesc = ChangeDescription(public=True, text=description or "")
            changedesc.record_field_change('status', self.status, type)
            changedesc.save()

            self.changedescs.add(changedesc)

            if type == self.SUBMITTED:
                self.public = True

            self.status = type
            self.save(update_counts=True)

            if description:
                logging.warn('SAVE DESCRIPTION SET RR:' + description)

            logging.warn('SAVE RR:' + changedesc.text)
            logging.warn('SAVE STACK:' + traceback.format_exc())

            review_request_closed.send(sender=self.__class__, user=user,
                                       review_request=self,
                                       type=type)


stacktrace in log:
WARNING:root:SAVE RR:
WARNING:root:SAVE STACK:Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7.23-py2.7.egg/djblets/webapi/resources.py", line 441, in __call__
    request.method = 'POST'
AttributeError: can't set attribute


What operating system are you using? What browser?
Linux Ubunty-12.04-32bit
Mozilla Firefox 26.0

Please provide any additional information below.
This information is required by a own written extension that connects on review_request_closed.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to