Added backend work for the archive profile setting

Review Request #14003 — Created June 28, 2024 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

Began backend implementation for a profile setting that will determine whether
to automatically archive a review request when posted.
This included adding a publish_and_archive BooleanField to the
AccountSettingsForm in reviewboard/accounts/pages.py, which is initially set
to False. publish_and_archive was also added to the Profile in
reviewboard/accounts/models.py. Lastly, publish_and_archive was also added to
reviewboard/accounts/accounts.py in the js_user_session_info() function.

A series of tests were also implmeneted to ensure that the AccountSettingsForm
was initialized, loaded, and saved properly and that it correctly identified
invalid inputs. These tests were added to
reviewboard/accounts/test/test_account_settings_form.py.

All previous passing pytests still passed.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 14. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Commits

First Last Summary ID Author
Added backend work for the archive profile setting
cfe29bb89d2fb5360a79a582cb42ea5c4a73d996 Daniel
Changed publish_and_archive to bee a regular BooleanField.
110645ac302fce03f56b9d7331f8a78ccd4f57c7 Daniel
Added test to test_account_settings_form for previous changes.
d4c8e6df5b28303eee148ab113f92290cebe92ec Daniel
Slight change to single test
c47d6b0ce1e7ac74c8a5fed5a8ee8c01505fd6ca Daniel
removed trailing white space
a5a47c2c5bd39afd1969ac9a6f5ecb5693ca6994 Daniel
reviewboard/accounts/models.py
reviewboard/accounts/forms/pages.py
reviewboard/accounts/templatetags/accounts.py
reviewboard/accounts/tests/test_account_settings_form.py
Loading...