iam-mhaseeb / StandupMonkey

A self hosted slack bot to conduct standups & generate reports.

Home Page:https://standup-monkey.herokuapp.com/slack/install

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add frequency functionality for weekly or monthly only

datatalking opened this issue · comments

This repo has potential and I'd like to help add features.

For people who are not needed to attend a daily standup, where would I change the frequency or introduce a function to enable that option?

  1. Does this prompt the user to do a standup or does it alert someone up the organization that xyz person has not done their standup at all or was late?

It doesn't send any alert to the organization, simply saves responses and you can then request a report using the code below. Also, it sends standup status messages to the public channel as soon as someone submits them.
/generate-report @user start_date end_date

At the moment it doesn't support frequency functionality for that we would need to make changes in this piece of code and schedule it somehow.

I suppose the easiest or shortest way to test it out could be to add a custom function with decorator below def action_today_standup_status() at line 233 and move the existing def action_blocker_standup_status() down.

`
def action_today_standup_status(body, ack, say):

def action_weekly_standup_status(body, ack, say):
ack()
user_id = body['user']['id']
msg = body['actions'][0]['value']
# say(f"<@{body['user']['id']}> submitted standup status with message: {msg}.")
# TODO RESEARCH SLACK API calendar function
day_choice(user_id, column_name='today', message=msg
upsert_today_standup_status(user_id, column_name='today', message=msg)
post_standup_completion_message(user_id, say)

@app.action("blocker-action")
def action_blocker_standup_status(body, ack, say):
`

Which brings to mind further functionality, I will have to research SLACK_API if it supports saving requests, then prompting the user to choose an appointment if none was chosen from yesterdays or the previous session ended prior to selection of a date/time. This is something we would like in our slack group.

Go for it, raise a PR, and I'll review and merge it.