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

fix function _getAssignedResourceBooking() #56

Merged

Conversation

imcaizheng
Copy link
Contributor

Changelog

  • GET /resourceBookings supports a new parameter named "projectIds". The value for the parameter should be a list of project ids separated by commas. Both swagger document and postman collection are updated to reflect the change.
  • function searchResourceBookings(criteria) for the ResouceBookingService supports an additional argument which could be { returnAll: true|false }.
  • inside function getTeamDetails() for the TeamService make use of the features listed above to search all assigned resources filtering by a list of project Ids.

async function searchResourceBookings (criteria) {
async function searchResourceBookings (criteria, options = { returnAll: false }) {
if (criteria.projectIds) {
if ((typeof criteria.projectIds) === 'string') {
Copy link
Contributor

@maxceem maxceem Dec 15, 2020

Choose a reason for hiding this comment

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

Works great @imcaizheng. Just one minor thing.
Can we directly check for (typeof criteria.projectIds) === 'string' removing additional if (criteria.projectIds) { to keep things clear?

Or combine them into one if.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maxceem Of course we can remove the additional check.

@maxceem maxceem merged commit b4e9ed5 into topcoder-platform:dev Dec 15, 2020
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.

None yet

2 participants