-
Notifications
You must be signed in to change notification settings - Fork 20
Solution overview
App Technical Details
The app is built using the Bot Framework SDK v4 for .NET and ASP.NET Core 2.1
The Scrums for Channels App application has the following main capabilities:
- The app provides an easy way for users to share their daily scrum updates. It provides an interface to
-
Update scrum - allows an end-user to update scrum details in the respective team channel.
-
Scrum details - will show the daily status for all the team members in that scrum team.
-
Notify end users when a scrum is started.
-
End scrum - close the scrum for the day and will disable entering/updating status for anyone.
-
Settings - Within a channel allow sub-teams to be formed and schedule scrums for those teams so that they can report their daily status within their group without disturbing the flow of the channel. The Settings screen shows the list of all the scrum teams that have been created against a particular channel and allow participants to be added/removed from the team.
-
An archival job runs monthly to export all data till 1 month prior to the current date for all the teams, the file will be saved in channel files and once the file is created, the old data is deleted from the table storage.
-
Archival job background service design:
-
Background service will be executed monthly on the last day of the month.
-
Once service is invoked, the app reads all data from storage for the last 30 days and export to excel.
-
Archival steps:
- Fetch data from Scrum table storage which is created before the calculated date.
- Fetch data from ScrumStatus table storage for each scrum fetched using the above step.
- Export to excel file stream.
- Share in channel documents with the specified format.
- Delete exported data from storage after exporting successfully.
-
10K rows constitutes to 1 MB and file less than 4MB can be exported.
For example:
- Let's assume that App service is deployed on May 15th. The app will calculate the next run date as May 31st.
- Service will get invoked on May 31st and tt will calculate export date as April 30th.
- It will check if there is any scrum data available to export which is created before April 30th.
- If found, it will export data as per the above logic. If not then, it will skip exporting data
- Schedule the next run to June 30th.
Technical specifications:
Microsoft graph APIs
The application gets the drive details mainly drive id and post the excel to the respective channel which requires application permissions as Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All. Drive id obtained from a GET call API is passed to create an excel post API call. Group id is obtained from the channel link which is stored in the storage as AADGroup id.
Sr. No. | Use Case | API |
---|---|---|
1. | Get drive id of team to export file at this drive in share point | GET https://graph.microsoft.com/v1.0/groups/{groupId}/drive |
2. | Create xlsx file and upload on sharepoint | POST https://graph.microsoft.com/v1.0/drives/{driveId}/root:{FilePath}:/content |
ClosedXml Nuget package - We are using this NuGet package to create an excel workbook. We create a memory stream and write stream to SharePoint.
For nuget referece click here
Bot Commands
-
Settings
- Settings command will open a task module to everyone in the team and shows the list of all the scrum teams that have been created against a particular channel.
- “+ Add a new scrum”: This button allows a new row to be created at the end of the grid, where you will be able to create a new team.
Start scrum scenario
-
App auto starts the scrum based on the day and time trigger. Before starting the scrum, the app will validate the scrum member list against the list of members in the team.
-
Start scrum card is scheduled as per the start time entered by the user. Start time is converted to UTC time and its respective hour is stored.
-
Background service is scheduled every 30 minutes to get storage details. The scrum card is scheduled for the current half an hour.
For example, the scrum card is scheduled at 12 pm IST and its respective UTC hour i.e. 6 AM is stored. Since the storage call is scheduled at every 30 minutes so, at 6 AM system's local time, it fetches all the scrums that are scheduled at UTC hour 6 AM. For the scrums scheduled in the next 30 minutes, the scrum cards are sent to respective channels.
-
When a scrum is started, a notification will be sent to the user. When a user adds his/her updates to the scrum, the corresponding card for the user will be updated.
- Update scrum
- Update scrum button invokes a task module that renders an adaptive card with 3 input fields for providing scrum updates.
-
Invoke type is ‘task/fetch’.
-
The adaptive card has submit action button which invokes the submit action.
-
Refresh the card when validation fails with an error message for a mandatory field, does not store the field entries in table storage.
-
Scrum details will open a task module that will show the daily status for all the team members in that scrum team
-
End scrum
- Clicking this button will close the scrum for the day and will disable entering/updating status for anyone.