Skip to content
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

Project approval history #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GreatDanton
Copy link
Collaborator

@GreatDanton GreatDanton commented Nov 27, 2024

Approval history endpoint is now returning data.

Q: Should we limit the maximum number of returned approvals to some reasonable number (e..g, last 100 approvals)? Otherwise with enough time we may end up with returning too much data for the frontend to handle (most of which the user is not even interested in).

@tangkong
Copy link
Contributor

I think a limit is a good idea. We can arbitrarily set the limit to 100 now and reconsider later

Comment on lines +909 to +913
licco_db[line_config_db_name]["switch"].insert_one({
"prj": ObjectId(prjid),
"requestor_uid": project_submitter,
"switch_time": datetime.datetime.utcnow()
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to try and populate the other fields expected by the rest of the app?

export interface ProjectApprovalHistory {
_id: string;
switch_time: Date;
requestor_uid: string;
prj: string; // project name
description: string;
owner: string;
}

Copy link
Collaborator Author

@GreatDanton GreatDanton Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we query the data (get_projects_approval_history method), the missing data is populated with the data from the projects table (owner, description, project name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants