If channels are created with a certain arrangement of characters, the channel appears twice

Description

Summary

When a channel is created with a certain combination of characters (including special characters), the created channel will be shown in both the channels list and the direct messages list

Environment

Tested in the following :

  • Mattermost 5.19.1

  • Mattermost 5.17.1

  • Mattermost 5.20.2

  • Mattermost 5.21.0

Steps to reproduce

Create a channel with the following combination of characters - 10 characters<space>9 characters<space>dash<space>9 characters<space>7 characters

For example, a 10 character word - additional
Followed by a 9 character word - abilities
Then another 9 character word - community
And finally a 7 character word - systems

The resulting channel name will be something like this :

Expected behavior

The channel will be created as per usual and only appear in the list of channels

Actual behavior

It appears in both the channel list and direct messages :

Notes

  • Whether or not caps are used does not seem to affect it

  • The dash has to be present for the behavior to happen

  • Changing the name or the URL of the channel after it is created (and shows up in both places) doesn't change the behavior

  • Right now this is the only number of characters that I can confirm is causing the issue, from my tests, removing or adding one of 2 characters when creating the channel causes the behavior to not happen

QA Test Steps

Please also cover a test case where you have a channel with this issue in 5.19.1, then upgrade to 5.19.2. Need to confirm if the preferences also need to be cleared after the upgrade, or if the upgrade will handle it itself. (Can ask Farhan for more details)

  • Create a public channel with the name `additional abilities - community systems` or any other 40 character name

  • Ensure that it does not show in the direct messages list

  • Create a group message channel and ensure that it shows up in the direct messages list

  • Create a direct message and ensure that it shows up in the direct messages list

Mana

None

Assignee

Farhan Munshi

QA Assignee

Rohitesh Gupta

Reporter

Joe Wai Tye

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

Labels

QA Testing Areas

LHS

GitHub Issue

None

Components

None

Severity

S2_functionality_loss_or_cosmetic_regressions
Configure