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

Add dynamic replies feature #14

Merged
merged 4 commits into from
May 7, 2024
Merged

Add dynamic replies feature #14

merged 4 commits into from
May 7, 2024

Conversation

sjwmoveon
Copy link

@sjwmoveon sjwmoveon commented May 3, 2024

Fixes StateVoicesNational#2357

Description

Add a new option under "Dynamic Assignment" under campaign setup which creates a special link. That link is used to reassign "needs reply" conversations dynamically - whenever a user goes to that link they will receive up to (batch size) conversations that need a reply and have not been reassigned in the past hour.

Spoke_Dynamic_Replies

Checklist:

  • I have manually tested my changes on desktop and mobile
  • The test suite passes locally with my changes
  • If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • I have made any necessary changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • My PR is labeled [WIP] if it is in progress

Generates a special link used to reassign replies.  Known bugs: replies can be reassigned indefinitely because the `updated_at` field in `campaign_contact` does not actually update on reassignment.
@crayolakat
Copy link

@ibrand Can you confirm if we can remove the SonarCloud check?

Copy link

@crayolakat crayolakat left a comment

Choose a reason for hiding this comment

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

Looks good! I left some comments, and also suggest changing the organizationUuid variable name in the dynamicReassign function to campaignJoinToken or joinToken to reflect what it actually is!

Also, the SonarCloud test is failing but I think MoveOn is no longer using SonarCloud so the check can be removed. I tagged Ilona to verify.

__test__/server/api/campaign/campaign.test.js Outdated Show resolved Hide resolved
src/server/api/schema.js Outdated Show resolved Hide resolved
…using the joinToken value

Also remove an unnecessary import and fix a comment
Copy link

sonarcloud bot commented May 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
11.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@ibrand
Copy link

ibrand commented May 6, 2024

Yep, we're planning to remove Sonarcloud. Are any of these issues worthy of fixing while we still have it?

@sjwmoveon sjwmoveon merged commit 77cc415 into main May 7, 2024
13 of 14 checks passed
@sjwmoveon sjwmoveon mentioned this pull request Jun 6, 2024
7 tasks
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.

Feature Request: Reply reassignment by batch feature (MoveOn)
3 participants