Skip to content

Leave Management

Hardik Bhatt edited this page Nov 2, 2016 · 3 revisions

Overview

Leave management uses the slash command to apply and manage leave easily over Slack. The commands used are Leave Apply, Leave List, Leave Status, Leave Cancel, Leave Balance and Leave Help.

Functional Requirement

###Initial Setup

  1. Our slack app must be added to the slack team.
  2. All members who intend to use leave slash command must be registered as users in OAuth.
  3. All users must login with Promact in our slack application once.

The commands in detail:

###Leave Apply

  1. /leaves apply [Reason] [From Date : dd-MM-yyyy] [End Date : dd-MM-yyyy] [Type] [Re-join Date : dd-MM-yyyy]
  2. The above is the format of leave slash command to be applied from slack for leave request.
  3. Example :- /leaves apply “Reason for leave” 30-09-2016 01-10-2016 Casual 02-10-2016
  4. After applying for leave, the user will get an ephemeral message on slack that leave has been applied. And meanwhile, Team leader for that user along with management people will get a message in Slackbot direct message that leave has been applied by the particular user with the full description of leave from leavebot on behalf of the user.
  5. And an email will be sent to corresponding team leader and management people. vi. If anything went wrong an ephemeral message will be sent to the user either “Sorry you can't apply for leave. Either you are not in Promact OAuth or yet u haven't login in Promact-slack server” or “I didn't quite get that. I'm easily confused. Perhaps try the words in a different order. For help: /leaves help”.

###Leave List:

  1. Here we have two formats of slash command for leave list:
    1. /leaves list [username]
    2. /leaves list
  2. Examples :-
    1. /leaves list Siddhartha, to have the leave list of Siddhartha
    2. /leaves list, to have the leave list of your own.
  3. The above two /leaves list command is to get the list of leave has been applied by a particular.
  4. For this slash command, user we have an ephemeral message from leavebot and contain all of its leave request details in a list form.
  5. If anything went wrong an ephemeral message will be sent to the user either “Leave doesn't exist for that user. Enter a valid slack username. Example:- /leaves list username or /leaves list” or “I didn't quite get that. I'm easily confused. Perhaps try the words in a different order. For help: /leaves help”.

###Leave Status

  1. Here we also have two formats of slash command for leave status
    1. /leaves status [username]
    2. /leaves status
  2. Examples :-
    1. /leaves list Siddhartha, to have the previous leave detail of Siddhartha with status [approved/rejected/cancel] of leave
    2. /leaves the list, to have the previous leave detail of your own with status [approved/rejected/cancel] of leave.
  3. The above two /leaves list command is used to get the previous leave details of a particular user with the status of leave.
  4. For this slash command, user we have an ephemeral message from leavebot and contain previous leave details.
  5. If anything went wrong an ephemeral message will be sent to the user either “Leave doesn't exist for that user. Enter a valid slack username. Example: - /leaves status username or /leaves status” or “I didn't quite get that. I'm easily confused. Perhaps try the words in a different order. For help: /leaves help”.

###Leave Cancel

  1. /leaves cancel [integer Id number of leave]
  2. After the above command, the user will get the ephemeral message that his/her leave with description and details has been cancel.
  3. If someone tries to cancel the leave off other then they will get an ephemeral message either “You are trying with wrong leave-Id which not belong to you” or “I didn't quite get that. I'm easily confused. Perhaps try the words in a different order. For help: /leaves help”.

###Leave Balance

  1. /leaves balance
  2. Above command will send an ephemeral message to the user with their leave balance how many has been taken out of total leave allowed to him/her along with how many leave he/she have left.
  3. If someone tries to cancel the leave off other then they will get an ephemeral message either “Either you are not in Promact OAuth or yet u haven't login in Promact-slack server” or “I didn't quite get that. I'm easily confused. Perhaps try the words in a different order. For help: /leaves help”.

###Leave Help

  1. /leaves help
  2. Above command will send ephemeral message to user For leave apply: /leaves apply [Reason] [From Date: dd-MM-yyyy] [End Date: dd-MM-yyyy] [Leave Type] [Re-join Date: dd-MM-yyyy] For leave list of yours: /leaves list For leave list of others: /leaves list [@user] For leave Cancel: /leaves cancel [leave Id number] For leave status of yours: /leaves status For leave status of others: /leaves status [@user] For leaves balance: /leaves balance

Test Cases

Final design

Add final design here

Clone this wiki locally