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: Assignments limit shouldn't prevent from reassigning a post #556

Conversation

AndrewPrigorshnev
Copy link
Contributor

@AndrewPrigorshnev AndrewPrigorshnev commented Mar 26, 2024

At the moment, it's possible to have maximum 5 assignments per topic (that includes topic and post assignments). When trying to assign more, this message appears:

Screenshot 2024-03-26 at 21 09 49

One possible edge case here is reassigning a topic or a post. Reassignment doesn't lead to exceeding the limit, and therefore it should be possible. But at the moment we handle correctly only topic reassignments, while when reassigning a post, we show the error message "the limit has been reached".

This PR makes post reassignments work correctly too.

@AndrewPrigorshnev AndrewPrigorshnev force-pushed the fix/assignment-limit-shouldnt-prevent-from-reassigning-a-post branch from 95981fc to 67e7c2c Compare March 26, 2024 18:26
@AndrewPrigorshnev AndrewPrigorshnev force-pushed the fix/assignment-limit-shouldnt-prevent-from-reassigning-a-post branch from 67e7c2c to ac760c2 Compare March 26, 2024 18:35
@AndrewPrigorshnev AndrewPrigorshnev marked this pull request as ready for review March 26, 2024 18:47
@@ -264,6 +264,21 @@ def assigned_to?(assignee)
expect(second_assign[:success]).to eq(true)
end

it "assignments limit doesn't prevent from reassigning a post" do
Copy link
Contributor

Choose a reason for hiding this comment

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

thats not a very english sentence

@@ -264,6 +264,21 @@ def assigned_to?(assignee)
expect(second_assign[:success]).to eq(true)
end

it "assignments limit doesn't prevent from reassigning a post" do
Copy link
Member

Choose a reason for hiding this comment

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

How about?

Suggested change
it "assignments limit doesn't prevent from reassigning a post" do
it "reassigns even when at the assignments limit" do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, with one detail that we should explicitly mention that this test is for reassigning a post. We also reassign topics sometimes.

@AndrewPrigorshnev AndrewPrigorshnev merged commit 51920a9 into main Mar 29, 2024
5 checks passed
@AndrewPrigorshnev AndrewPrigorshnev deleted the fix/assignment-limit-shouldnt-prevent-from-reassigning-a-post branch March 29, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants