-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/ucd 36 custom application history page #279
Feature/ucd 36 custom application history page #279
Conversation
Remove the history records from Person (and derived classes) and Registrant as it is not used by the admins.
Check if we are on local environment before trying to send the emails. This will enable us to test the model updates without any interruptions on local testing.
Customise the review history so that it shows the summary of application status changes along with the changes done in the review. To provide this, we had to override the /simple_history/object_history.html so we keep the default behaviour for all other types. In the status summary table, we filter out similar records and only display the latest record of the similar group. For detailed information, the user can view the relevant application's history under Applications.
Disable change on the following entities 1. Registrar 2. Registrant 3. RegistryPublishedPerson 4. RegistrantPerson 5. RegistrarPerson
<th scope="col">{% trans 'Date/time' %}</th> | ||
<th scope="col">{% trans 'Event' %}</th> | ||
<th scope="col">{% trans 'Changed by' %}</th> | ||
<th scope="col">{% trans 'Change fields' %}</th> |
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.
"Changed Fields" is better I think
{% endif %} | ||
</td> | ||
<td> | ||
<i>{{ action | changed_fields }}</i> |
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.
Why <i>
? I don't think it's needed. It actually makes the text harder to read. Maybe you could also use something to join using commas as opposed to displaying the raw string. Better abc, def
than ['abc', 'def']
|
||
{% block content %} | ||
<div id="content-main"> | ||
<h2>{% blocktrans %} Status change history{% endblocktrans %}</h2> |
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.
why blocktrans
?
@@ -58,25 +64,23 @@ <h2>Full event history</h2> | |||
<thead> | |||
<tr> | |||
<th scope="col">{% trans 'Date/time' %}</th> | |||
<th scope="col">{% trans 'Event' %}</th> | |||
<th scope="col">{% trans 'Changed by' %}</th> | |||
<th scope="col">{% trans 'User' %}</th> | |||
<th scope="col">{% trans 'Change fields' %}</th> |
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.
"Changed fields" is better I think
@@ -15,22 +17,49 @@ def changed_fields(obj): | |||
if obj.prev_record: | |||
delta = obj.diff_against(obj.prev_record) | |||
changes = list(filter(lambda x: x != "last_updated_by", delta.changed_fields)) | |||
return changes if changes else "Updated through review" | |||
return changes if changes else "--" |
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.
Can you put something more explicit than --
? What does it mean for the user when there are no changes? Why show entries in the history if there are no changes?
@@ -25,7 +25,7 @@ <h2>Full event history</h2> | |||
<tr> | |||
<th scope="col">{% trans 'Date/time' %}</th> | |||
<th scope="col">{% trans 'User' %}</th> | |||
<th scope="col">{% trans 'Change fields' %}</th> | |||
<th scope="col">{% trans 'Change Fields' %}</th> |
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.
"Changed fields"
@@ -65,7 +65,7 @@ <h2>Full event history</h2> | |||
<tr> | |||
<th scope="col">{% trans 'Date/time' %}</th> | |||
<th scope="col">{% trans 'User' %}</th> | |||
<th scope="col">{% trans 'Change fields' %}</th> | |||
<th scope="col">{% trans 'Change Fields' %}</th> |
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.
"Changed fields"
@@ -17,8 +17,8 @@ def changed_fields(obj): | |||
if obj.prev_record: | |||
delta = obj.diff_against(obj.prev_record) | |||
changes = list(filter(lambda x: x != "last_updated_by", delta.changed_fields)) | |||
return changes if changes else "--" | |||
return "-" | |||
return ", ".join(changes) if changes else "No Changes" |
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.
"No changes" (lower case c)
e7cfc72
to
fba6e57
Compare
Updated the UI to make it more user-friendly.
fba6e57
to
f94ad84
Compare
Customise the review history so that it shows the summary of application status changes along with the changes done in the review.
To provide this, we had to override the /simple_history/object_history.html so we keep the default behaviour for all other types.
In the status summary table, we filter out similar records and only display the latest record of the similar group. For detailed information, the user can view the relevant application's history under Applications.