UX: don't mention the group when no one is assigned. (#346)

It's a minor copyedit to remove group mention from the post raw. Else it sends a notification to all group members when no one is found to be assigned.
This commit is contained in:
Vinoth Kannan 2022-06-08 23:52:14 +05:30 committed by GitHub
parent 201f115387
commit 3d4f63f921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ en:
scriptables:
random_assign:
title: Random assign
no_one: "Attempted randomly assign a member of @%{group}, but no one was available."
no_one: "Attempted randomly assign a member of `@%{group}`, but no one was available."
discourse_push_notifications:
popup:
assigned: "@%{username} assigned you"

View File

@ -34,7 +34,7 @@ describe RandomAssignUtils do
it 'creates post on the topic' do
described_class.automation_script!({}, { 'assignees_group' => { 'value' => group_1.id }, 'assigned_topic' => { 'value' => topic_1.id } }, automation)
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of @#{group_1.name}, but no one was available.")
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of `@#{group_1.name}`, but no one was available.")
end
end
@ -50,7 +50,7 @@ describe RandomAssignUtils do
it 'creates post on the topic' do
described_class.automation_script!({}, { 'assignees_group' => { 'value' => group_1.id }, 'assigned_topic' => { 'value' => topic_1.id } }, automation)
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of @#{group_1.name}, but no one was available.")
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of `@#{group_1.name}`, but no one was available.")
end
end
@ -94,7 +94,7 @@ describe RandomAssignUtils do
it 'creates post on the topic' do
described_class.automation_script!({}, { 'in_working_hours' => { 'value' => true }, 'assignees_group' => { 'value' => group_1.id }, 'assigned_topic' => { 'value' => topic_1.id } }, automation)
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of @#{group_1.name}, but no one was available.")
expect(topic_1.posts.first.raw).to match("Attempted randomly assign a member of `@#{group_1.name}`, but no one was available.")
end
end