fix(leads): give a new form lead the same owner as its first call
When a form has no round-robin assignees, the lead now follows the person the automation assigns to the first call. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
type AutomationStep,
|
||||
} from '@mento/shared';
|
||||
import {
|
||||
claimLeadAssignee,
|
||||
formatFormAnswers,
|
||||
pickRoundRobin,
|
||||
renderAutomationTemplate,
|
||||
@@ -136,6 +137,13 @@ describe('اتوماسیون شاخهای فرم', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('مسئول سرنخ فقط از اولین فعالیت دارای مسئول پر میشود', () => {
|
||||
assert.equal(claimLeadAssignee(false, null), null);
|
||||
assert.equal(claimLeadAssignee(false, ' '), null);
|
||||
assert.equal(claimLeadAssignee(false, 'romina'), 'romina');
|
||||
assert.equal(claimLeadAssignee(true, 'fatemeh'), null);
|
||||
});
|
||||
|
||||
it('تقسیم نوبتی مساوی و پایدار', () => {
|
||||
const team = ['u3', 'u1', 'u2'];
|
||||
const picks = [1, 2, 3, 4, 5, 6].map((n) => pickRoundRobin(team, n));
|
||||
|
||||
Reference in New Issue
Block a user