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

[FEATURE] Ditch rota name in command syntax when there's only one rota #61

Open
burlakov-nick opened this issue Jun 14, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@burlakov-nick
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I use dienstplan in context when only one rota is created in slack channel. Usually I forget to specify rota name and type something like this:

@dienstplan assign @username

And get usage help message. I'm frustrated, because in my case dienstplan could understand that there's only one rota and allow ditching rota name in assign command syntax.

Describe the solution you'd like
I'd like to have a simplified syntax for assign command that works when there's only one rota in channel.

@dienstplan assign @username

Probably other commands can work the same way as described:

  • rotate
  • who
  • shout
  • about
  • delete

Describe alternatives you've considered
As an alternative I could do my homework and memorize command syntax 🤓

@burlakov-nick burlakov-nick added the enhancement New feature or request label Jun 14, 2022
@pilosus
Copy link
Owner

pilosus commented Mar 7, 2024

I've realized that we discussed it elsewhere, but I never replied here :-) So, for transparency:
I do think it's a nice feature!

Basically, in all the commands that use <rotation name> we need to do:

  • check if rotation name is nil
  • if it's nil, check in the db's rota table if there is exactly one rotation in the current slack channel, if yes, pass its name as rotation name.

This is probably not too tedious to implement, though it will affect a few moving parts:

For me this feature isn't of any visible priority, as I find current syntax for dienstplan commands to be pretty straightforward: mention the bot -> command name -> rotation name -> all other arguments to the command (if any).

But I'll happy to review a PR.

@pilosus pilosus added the help wanted Extra attention is needed label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants