372: Provide a better default for the repository selector

man****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 7, 2010
1763
795, 1074
What's the URL of the page containing the problem?
http://reviewboard.eng.vmware.com/r/new/

What steps will reproduce the problem?
1. Goto the page.

What is the expected output? What do you see instead?
It would be nice to be able to pick a default value for the Repository.
That way I do not have to scroll to the bottom of the ComboBox list to set
the value. Incidentally, my repository got pushed to the last in the list
and therefor the annoyance :)

What operating system are you using? What browser?


Please provide any additional information below.
chipx86
#1 chipx86
Yes, this would be useful. I've considered this in the past. I think what we should
do is remember the last repository used and just use that one, since it's usually
going to be correct.

We're trying to keep our list of 1.0 feature requests down, but I think this one is
useful enough and easy enough to get in.
  • -Type-Defect
    +Type-Enhancement
    +Component-Reviews
    +Milestone-Release1.0
  • +Provide a better default for the repository selector
#2 cuv****@gmai***** (Google Code) (Is this you? Claim this profile.)
Saving the MRU repository sounds like a great idea.

I would also like to see the repo list sorted by name (instead of DB order), which
can be done like so:

--- a/reviews/forms.py
+++ b/reviews/forms.py
@@ -27,7 +27,7 @@ class NewReviewRequestForm(forms.Form):
     def __init__(self, *args, **kwargs):
         forms.Form.__init__(self, *args, **kwargs)
         self.fields['repository'].choices = \
-            [(repo.id, repo.name) for repo in Repository.objects.all()]
+            [(repo.id, repo.name) for repo in Repository.objects.order_by('name')]

     @staticmethod
     def create_from_list(data, constructor, error):
#3 cuv****@gmai***** (Google Code) (Is this you? Claim this profile.)
While you're saving the last-used repository, it might be nice to fill in the base
path with the last-used value as well.
david
#4 david
  • +Confirmed
chipx86
#5 chipx86
Going to push this to 1.5. This will require database changes, which I'm trying to
limit right now, and I want to rethink some other aspects of this before doing any
major surgery.
  • -Milestone-Release1.0
    +Milestone-Release1.5
chipx86
#8 chipx86
  • -Milestone-Release1.5
    +Milestone-Release1.1
chipx86
#9 chipx86
  • +Milestone-Release1.5
chipx86
#10 chipx86
Pushing back to 1.6.
  • +Milestone-Release1.6
chipx86
#11 chipx86
  • +Priority-High
david
#12 david
1763 has a more comprehensive request.