This project is a Google Apps Script that integrates with Jira and Google Chat to remind team members to log their work hours. It sends notifications to a specified Google Chat space based on the logged work hours in Jira.
- Sends daily reminders to log work hours.
- Sends sprint closure reminders.
- Checks if the logged hours meet the expected criteria.
- Configurable for different environments (testing, unofficial, official).
- Google Apps Script account.
- Jira account with API access.
- Google Chat webhook URL.
-
Clone the repository:
git clone https://github.com/yourusername/jira-time-log-reminder.git cd jira-time-log-reminder -
Open the script in Google Apps Script:
- Go to Google Apps Script.
- Create a new project.
- Copy the contents of
timeLogReminder.jsinto the script editor.
-
Set up environment variables:
Update the following variables in
timeLogReminder.jswith your specific details:let MAIL_ID = "your-workplace-email-id"; let API_TOKEN = "your-jira-api-token"; let JIRA_PROJECT_NAME = "your-project-board-name"; let TESTING_SPACE_URL = "your-test-google-chat-webhook-url"; let OFFICAL_SPACE_URL = "your-google-chat-webhook-url";
-
Configure Jira users:
Update the
JIRA_PEOPLEarray with the display names and Google Chat IDs of your team members:let JIRA_PEOPLE = [ { NAME: "User-1", ID: "google-chat-id-1", }, { NAME: "User-2", ID: "google-chat-id-2", } ];
-
Set up triggers:
Run the
setTriggerfunction to set up the necessary time-based triggers.
The script will automatically send reminders based on the configured schedule. You can manually run the following functions for testing or immediate execution:
morningReminder: Sends a daily reminder at 9:15 PM.doComplain: Sends a morning reminder to log time for yesterday or Friday (if Monday).sprintClosureReminder: Sends a sprint closure reminder on Tuesdays.
