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.

Changes between revision 7 and 8

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

Commits

Summary ID Author
Added backend work for the archive profile setting
30cd3e40f35bf86e5fff334e205b4a9d7c395a32 Daniel
Changed publish_and_archive to bee a regular BooleanField.
f5642d198399b493640a0be29f41c3c60e372bca Daniel
Added test to test_account_settings_form for previous changes.
a75b7f76d0770663b0917cd54619ff2e4c78ce6d Daniel
Slight change to single test
86eafb7560527799c4d0c5bb4c3ee233ff9ae13c Daniel
removed trailing white space
bdaeedea3b36037dd2393783dde199c643a3fd12 Daniel
Fixing issues highlighted in review.
719420e92218e671ce1439a2c5e15ea4c35acb33 Daniel
Removed whitespace
58b864eb6e433f433210aea8c9fb7358ebc55750 Daniel
Changed publish_and_archive to be property and not BooleanField to not be add...
a8f699817a20db342ba4f06e66187efa2deb535d Daniel
Fixed indentation
9a4e5a39cffa34d42733fde47471c07da8b9f6ea Daniel
Rearanged Imports
0bb80089745beb1fe1765b96099976d636b06f3d Daniel
Small changes for review request
e855ea81bcd4ebfeac8572d8023a881b5efc4399 Daniel
Added more comments.
0307ff863048c7b1e59fcfc52ece05eb0d17d575 Daniel
Added super().setup()
72786f2862a5c144400201a53ff676db0062265c Daniel
reviewboard/accounts/tests/test_account_settings_form.py
Loading...