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

feat: Round Robin Skip If contact owner first available slot is more than 2 weeks, round robin as normal #17416

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

Conversation

joeauyeung
Copy link
Contributor

@joeauyeung joeauyeung commented Oct 31, 2024

What does this PR do?

In a sales environment, we want prospects to book a time that is not too far out. If the contact owner does not have an open slot within two weeks, default to normal round robin (includes attribute routing)

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

https://www.loom.com/share/251967b87fab4b028f3af7637ce3d270?from_recorder=1&focus_title=1

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Set the contact owner to be OOO for more than two weeks
  • Route to the contact owner
  • The routing should not be for the contact owner but for the other members

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Copy link
Contributor

github-actions bot commented Oct 31, 2024

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "RR Skip: If contact owner first available slot is more than 2 weeks, round robin as normal". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@dosubot dosubot bot added the teams area: teams, round robin, collective, managed event-types label Oct 31, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Oct 31, 2024
@graphite-app graphite-app bot requested a review from a team October 31, 2024 02:48
Copy link

graphite-app bot commented Oct 31, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (10/31/24)

1 reviewer was added to this PR based on Keith Williams's automation.

hosts: eventHosts,
routedTeamMemberIds: input.routedTeamMemberIds ?? null,
contactOwnerEmail,
});

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.

We move all this logic into a separate function. Since we need to calculate the availability of the contact owner. If the first slot is more than 2 weeks away we then need to calculate the availability of the other members.

const getStartTime = (
startTimeInput: string,
timeZone?: string,
eventType: Exclude<Awaited<ReturnType<typeof getRegularOrDynamicEventType>>, null>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we be more specific in the typing here? just specify minimumBookingNotice as part of the event type.

@emrysal emrysal changed the title RR Skip: If contact owner first available slot is more than 2 weeks, round robin as normal feat: Round Robin Skip If contact owner first available slot is more than 2 weeks, round robin as normal Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only teams area: teams, round robin, collective, managed event-types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants