-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closes #19713: Enable recording user messages in the change log #19908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
27d026d to
1b11895
Compare
|
|
||
| cls.bulk_update_data = { | ||
| 'policy': vlan_translation_policies[1].pk, | ||
| 'policy': vlan_translation_policies[2].pk, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this change, the test was not producing the expected number of ObjectChange records, which failed a check in the updated test suite.
|
The test failure appears to be unrelated to these changes. Extension of the test functionality has uncovered an unrelated bug; see #19956. |
|
The CI failure should be addressed by the fix in PR #19957. |
|
|
||
| def test_bulk_delete_objects_with_permission(self): | ||
| pk_list = self._get_queryset().values_list('pk', flat=True) | ||
| pk_list = list(self._get_queryset().values_list('pk', flat=True))[:3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limit this test to three objects (as above) to avoid failing on cascading deletions for some test data.
jnovinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change requested and one question.
| Q(user_name__icontains=value) | | ||
| Q(object_repr__icontains=value) | ||
| Q(object_repr__icontains=value) | | ||
| Q(message__icontains=value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to make this a default queried field, should we add an index to the field? (He says not having looked at other similar fields yet ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not as part of this change. message here is analogous to description on most other models. I'm not sure if it makes sense to add an index for those fields, but it does it IMO it should be undertaken as part of an application-wide audit. For now I think it makes sense to continue the current convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, got ahead of myself here. Just got done looking around and realized the same thing about it being a bigger, separate chunk of work.
Closes: #19713
messagefield on the ObjectChange modelchangelog_messagefield to the object edit & delete formschangelog_messagevalue on the resulting ObjectChange record when an object is saved or deleted via the web UImessagevaluechangelog_messagefield to the necessary view templatesfieldsetson VirtualChassisCreateForm & discontinue use of the custom HTML template (to ensure consistent display of the changelog message field form)