-
-
Which Description is this? The submit message? I think we need to rename it if so, or somehow change how we show this. For now, maybe just "Close Description" ?
-
It would be awesome if we showed the message below this. Sort of like the review request draft banner, but not editable. Or actually... Rather than the edit box introduced in this change, this might be a better workflow: 1) Click Close -> Submitted 2) Page changes to this (no big edit box first). 3) The submit banner has an editable field for the description (much like review request draft banners). The field would be different than the standard fields. It'd be more of an instant apply. No draft. Change it and everyone sees it. For the ChangeDescription model, we could just do: changedesc = latest change description; if changedesc has field 'status': set changedesc.close_description; else: create new changedesc with close message. That means if you were to set a new close description, and there's already a change description for it, any modifications to that close description would just overwrite what's already in there. That would happen until some other change descrption has been created (new diff, field changes), in which case we just make a new one. I actually think this is the way to go. No extra work for those who just want to simply close a review request, and yet it's very straight-forward to update the description once submitted (even for old review requests).
Support attached comment for reviews submitions
Review Request #2338 — Created May 5, 2011 and submitted
* Added supported for close comment. After a review request is marked "submitted" or "discarded", submitter can add text to describe the submission. * Fixed a bug that submitting review request will trash unpublished draft. Now, a confirm windows will popup to remind users. * Showed submission date for submitted review request under summary. TODO: * Maybe rbtools support is needed.
Manually tested and unit tested. The unit test output attached. Some failed and errors happened, but it looks like caused by windows environment. In fact, the output is the same before and after this commit.
Description | From | Last Updated |
---|---|---|
If you build this data dynamically, based on whether options.comment is defined, then we can simplify all other call sites … |
chipx86 | |
If the above is done, this could go away. |
chipx86 | |
Can you change this to: "You have an unpublished draft. If you close this review request, the draft will be … |
chipx86 | |
This too. |
chipx86 | |
This can be simplified: changedesc = ChangeDescription(public=True, text=comment) The timestamp will already be datetime.now() by default, so you're good there. … |
chipx86 | |
Not needed. That's the default. Also, blank line after this. |
chipx86 | |
Shouldn't need the class. Any CSS/JavaScript can just reference the ID. |
chipx86 | |
Trailing whitespace. |
chipx86 | |
Trailing comma. |
chipx86 | |
No spaces around the = when dealing with parameters to a function. |
chipx86 | |
Sentence casing, with a period. |
chipx86 | |
The wrapping is weird. Rather than passing the field to latest(), I'd just modify changedescs/models.py:ChangeDescription.Meta to have: get_latest_by = 'timestamp' |
chipx86 | |
Sentence casing, with a period. |
chipx86 | |
Can we change this to "description"? I don't want to really mix definitions of "comment", since it usually means a … |
chipx86 |
- Change Summary:
-
Updated according to Christian's advice.
- Description:
-
~ - After user clicked 'submit', an windows will popup to prompt for comment, which is optional.
~ - Added support for status changed recording for Changedesc model.
~ - Added status changed into the history of review request changed, so that it can be displayed in front end.
~ - Added supported for submission comment. After a review request is marked "submitted", submitter can add text to describe the submission.
~ - Fixed a bug that submitting review request will trash unpublished draft. Now, a confirm windows will popup to remind users.
~ - Showed submission date for submitted review request under summary.
TODO:
- * Supported ability to modify "change number" (http://code.google.com/p/reviewboard/issues/detail?id=1021) - * Supported none-destructive submit. (http://code.google.com/p/reviewboard/issues/detail?id=1052) * Maybe rbtools support is needed. - Testing Done:
-
Manually tested and unit tested.
+ + The unit test output attached. Some failed and errors happened, but it looks like caused by windows environment. In fact, the output is the same before and after this commit.
- Bugs:
-
- Diff:
Revision 2 (+132 -20)
- Added Files:
- Screenshots:
discardedreopensubmitAfter submitSubmittedSubmitted-comment
-
Thanks for the changes! Good progress. There's a few more things with the new code, but nothing big. As for the change to tests.py, make sure your branch is fully synced with master. I just made a change to tests.py and I think you're not synced correctly.
-
If you build this data dynamically, based on whether options.comment is defined, then we can simplify all other call sites by not passing 'comment: ""' So: data = { status: statusType }; if (options.comment !== undefined) { data.comment = options.comment; } self._apiCall({ ... data: data, ... });
-
-
Can you change this to: "You have an unpublished draft. If you close this review request, the draft will be discarded. Are you sure you want to close the review request?"
-
-
This can be simplified: changedesc = ChangeDescription(public=True, text=comment) The timestamp will already be datetime.now() by default, so you're good there. I think comment will work if None is passed, but if not, that could be: text=comment or ''
-
-
-
-
You know... I'm curious. How hard would it be to implement this feature for discarded review requests too? Could be useful. Like, "This is discarded because it's implemented a different way in /r/123" If it's not a ton of work, I think it'd be really handy.
- Change Summary:
-
Changed according to advices from Christian.
- Description:
-
~ - Added supported for submission comment. After a review request is marked "submitted", submitter can add text to describe the submission.
~ - Added supported for close comment. After a review request is marked "submitted" or "discarded", submitter can add text to describe the submission.
- Fixed a bug that submitting review request will trash unpublished draft. Now, a confirm windows will popup to remind users.
- Showed submission date for submitted review request under summary.
TODO:
* Maybe rbtools support is needed. - Diff:
-
Revision 3 (+147 -21)
- Change Summary:
-
Minor fixed according to Christian advices.
- Diff:
-
Revision 4 (+148 -22)