Create extension for auto-assigning students to the students group
Review Request #7856 — Created Jan. 8, 2016 and discarded
A simple extension for auto-assigning students working on Review Board to
the "students" group.I can imagine this maybe being useful for other projects as well, so I can
see this expanding out to allow multiple auto-assignments, but for now I've
just hard-coded the "students" group.
Created some test users and a "students" group. Entered the extension
configuration page and added some users in the comma-separated list to
auto-assign. Created review requests for the users in the list and saw
that they were correctly added to the "students" group. The review requests
from the other users were not.
Description | From | Last Updated |
---|---|---|
'RBAutoAssigner' imported but unused |
reviewbot | |
'json' imported but unused |
reviewbot | |
Single quotes. |
brennie | |
Blank line here. |
brennie | |
Same here. |
brennie | |
And here. |
brennie | |
logging.info, etc will do % interpolation with positional arguments, so you can do: logging.info('foo %s', bar) |
brennie | |
Col: 80 E501 line too long (100 > 79 characters) |
reviewbot | |
Single quotes |
brennie | |
Prefer MANIFEST.in over package_data |
brennie | |
Instead of doing this on publish, what about on create? |
david | |
I don't think we care if they've joined the group or not. |
david | |
Would be better to do Group.objects.get(name=self.auto_assign_group) and catch Group.DoesNotExist |
david | |
Not possible. |
david | |
Limiting to 40 characters means we won't be able to put in very many usernames. |
david |
- Change Summary:
-
I've made it so that the extension can be configured with a
comma-separated list of student usernames. This way, we don't
end up auto-assigning review requests from everybody in the
students group (since that could include mentors). - Testing Done:
-
~ Created some test users and a "students" group, putting some of the users
~ in that group. Created review requests for the users in the group and saw ~ Created some test users and a "students" group. Entered the extension
~ configuration page and added some users in the comma-separated list to + auto-assign. Created review requests for the users in the list and saw that they were correctly added to the "students" group. The review requests from the other users were not. - Commit:
-
4f5d1ace5176226d1b1b01e715e524aae56b0db078dafb1bdf3fcc2e316968001891edd68a7eea96
-
Tool: PEP8 Style Checker Processed Files: rbauto_assigner/rbauto_assigner/admin_urls.py rbauto_assigner/rbauto_assigner/extension.py rbauto_assigner/setup.py rbauto_assigner/rbauto_assigner/forms.py Ignored Files: rbauto_assigner/rbauto_assigner/__init__.py