-
Notifications
You must be signed in to change notification settings - Fork 336
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
[ENG-5453] don't update last updated on project's page when log.should_hide=True #10943
[ENG-5453] don't update last updated on project's page when log.should_hide=True #10943
Conversation
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.
Could we get a test for this?
@brianjgeiger I've tried to play around with these actions and run new tests when should_hide=False passed to |
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.
Looks good to me. I may have someone more familiar with Spam take a quick look as well.
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.
Looks good to me. I may have someone more familiar with the Spam code take a quick look as well.
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.
Just some questions about the requirements, but otherwise looks a good improvement.
osf/models/node.py
Outdated
@@ -1280,6 +1280,7 @@ def set_privacy(self, permissions, auth=None, log=True, save=True, meeting_creat | |||
}, | |||
auth=auth, | |||
save=False, | |||
should_hide=True |
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.
Are we sure we always want to hide these logs? Seems like it should only be hidden scenarios where we set privacy ourselves.
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.
Good catch. Yeah, let's not hide these logs.
osf/models/preprint.py
Outdated
@@ -868,6 +868,7 @@ def set_privacy(self, permissions, auth=None, log=True, save=True, check_addons= | |||
}, | |||
auth=auth, | |||
save=False, | |||
should_hide=True |
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.
Also not sure if we want to hide these logs, it seems like intentional behavior, not sure about the use cases though.
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.
Let's also not hide these logs.
osf/models/node.py
Outdated
@@ -1280,6 +1280,7 @@ def set_privacy(self, permissions, auth=None, log=True, save=True, meeting_creat | |||
}, | |||
auth=auth, | |||
save=False, | |||
should_hide=True |
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.
Good catch. Yeah, let's not hide these logs.
osf/models/preprint.py
Outdated
@@ -868,6 +868,7 @@ def set_privacy(self, permissions, auth=None, log=True, save=True, check_addons= | |||
}, | |||
auth=auth, | |||
save=False, | |||
should_hide=True |
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.
Let's also not hide these logs.
If the spam functions are calling set privacy, we may have to make the spam calls of set privacy hide their logs, while default behavior for set privacy would be to show the logs. |
I also thought that making public/private project should add visible logs but I'm not familiar with spam functionality. Fixed it and conflict |
98a2534
into
CenterForOpenScience:feature/b-and-i-25-01
Purpose
Update "Last updated" on project's page only when log.should_hide = False
Changes
Added if condition to check if NodeLog requires to update last_logged attribute
Update spam methods to hide their logs
QA Notes
Documentation
Side Effects
Ticket
https://openscience.atlassian.net/jira/software/c/projects/ENG/boards/145?selectedIssue=ENG-5453