mattermost-community / mattermost-plugin-agenda

Mattermost plugin to handle meeting agendas
Apache License 2.0
35 stars 21 forks source link

Default Hashtag Format to Channel Name #10

Closed marianunez closed 4 years ago

marianunez commented 4 years ago

The agenda plugin configures a hashtag format for queuing meeting topics and it currently defaults to JAN02 with no other text description.

Update the default hashtag to use the first 15 characters of a channel name prefixed to the date format. For example: Developers-JAN02 would be the default hashtag for a channel called Developers


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-22727

attilamolnar commented 4 years ago

The hashtag format value is passed to time.Format() as-is which is designed only for formatting time. It is not for formatting strings in general. In this particular case changing the default value as proposed is problematic because the channel name can be e.g. "Jan" or "Mon", resulting in "Jan-JAN02" or "Mon-JAN02" which will end up being altered by time.Format().

We can add a separate option to set a prefix or suffix.

marianunez commented 4 years ago

Hi @attilamolnar! Your proposal sounds great. It will definitely make the hashtag formatting more robust.

There is already a PR for this ticket but we can create another issue to cover supporting a prefix/suffix for hashtag formatting. Thoughts @jfrerich ?

jfrerich commented 4 years ago

@attilamolnar I agree that adding a prefix/suffix option would be helpful. Are you interested in adding that functionality?

attilamolnar commented 4 years ago

Hi everyone, sure, I'll add those fields.

jfrerich commented 4 years ago

Hi @attilamolnar. Did you plan on creating a PR for this ticket?