forked from CATcher-org/CATcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve issue of allocating invalid assignees
Currently, when a user attempts to submit a team response with an invalid assignee (defined as an assignee who has not joined the organization), the team response is processed (by adding the team response GitHub comment) before the assignee checks are made. The error message for an invalid assignee is also vague, only stating "Validation Failed", with no additional context. This causes the issue to be erroneously classified as “Responded” when it has not actually been properly responded to as the “assignee” field would be left empty. The vague invalid assignee message also means users will not know what to do to fix the issue. This issue can be resolved by inverting the logic of team responses, ensuring the assignee validity is checked before making the team response comment. If the assignee is invalid, then the team response comment is never created, thus avoiding the erroneous classification. Also provided custom error parsing for invalid assignees to display proper reasons and actions for the validation failure for users to rectify the issue. A proper diagram of the inversion of logic can be found in the pull request: CATcher-org#1264 (comment)
- Loading branch information
Showing
2 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters