1155 add a column to track the reindexing curator#1180
1155 add a column to track the reindexing curator#1180Kirandawadi wants to merge 12 commits intodevfrom
Conversation
for more information, see https://pre-commit.ci
DemoReindexing_Curator.mov |
sde_collections/serializers.py
Outdated
| # If reindexing_status is REINDEXING_NOT_NEEDED, set Reindexing Curator field to None (reset to default) | ||
| if validated_data.get("reindexing_status") == 1: | ||
| validated_data["reindexing_curated_by"] = None | ||
|
|
There was a problem hiding this comment.
Can we maintain the history of changes on this field?
There was a problem hiding this comment.
History is now maintained.
|
Let's add a test file for the new features. Cover everything that makes sense, but also specifically I want to see that the ReindexingHistory logs are being maintained as we add additional reindexing curators. |
|
Can you also take a look at this part of the code: |
| }); | ||
| } | ||
|
|
||
| function handleReindexingCuratorSelect() { |
There was a problem hiding this comment.
Make this code dry and reuse code that we already have for CuratorSelect
There was a problem hiding this comment.
Tried to modularize the handleReindexingCuratorSelect() and handleCuratorSelect() functions into one, but ended up with too much if-else statements. So leaving as it is for better understandability.
|
Ok, slight design change. Lets only maintain one curator column, and populate the frontend based on the history. The original curator will be populated based on the first entry in the history table, and the reindexing curator will be populated based on the latest curator. |
|
The recurator doesn't get depopulated until curation in progress or recuration in progress. |
| success: function (data) { | ||
| toastr.success("Reindexing Status Updated!"); | ||
|
|
||
| // If reindexing_status is REINDEXING_NOT_NEEDED, set Reindexing Curator field to None (reset to default) |
There was a problem hiding this comment.
Take a look at the post_save method in collection.py and refactor it based on standards.
| tracker = FieldTracker(fields=["workflow_status", "reindexing_status"]) | ||
|
|
||
| curated_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True, blank=True) | ||
| reindexing_curated_by = models.ForeignKey( |
There was a problem hiding this comment.
write tests as well.
Changes made: