Duty Planner is a desktop application used to organise and plan duties for army personnel with various functions for commanders as well as duty personnel. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10kLoC
-
Major enhancement: Added Block Date Commands
-
What it does: Allows the user to block dates of duty for the upcoming month allowing them not to be scheduled for duties on those particular days
-
Justification: This features allows personnel to have some flexibility on the days the do duties and to ensure that they can attend other events or not do duties when they are busy
-
Highlights: This enhancement affected the scheduling algorithm and the algorithm and Duty system had to be modified to allow personnel to block Dates
-
Credits: Thanks to my other group members for helping to figure out the block date command
-
-
Minor enhancement: Added a command to view and remove blocked Dates
-
Code contributed: [Code]
-
Other contributions:
-
Did testing the parsers for the different commands
-
Project management:
-
Managed milestones and issue tracker for the project.
-
-
Enhancements to existing features:
-
Edited the person class with NRIC and Rank (Pull requests #31)
-
-
Documentation:
-
Did cosmetic tweaks to existing contents of the User Guide to modify it to a Duty Planner
-
Updated User and Developer Guide with the new commands that were added in
-
Modified AddressBook Diagrams to suit Personnel Database in Developer Guide
-
Added in Block Dates section in Developer Guide
-
-
Community:
-
Tools:
-
Integrated Codacy and Appveyor to the team repo
-
-
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
MINDEF Duty Planner is a platform to assist military units in the SAF in the assignment of daily guard duties amongst the servicemen.
The application is optimized for those who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI).
The software is designed to automate the process of fairly assigning duties to available servicemen for an entire month.
The application can be used by both Commanders and servicemen to plan and view duties with various specific commands for each type of user.
To start using MINDEF Duty Planner you can go to [Quick Start]
To see a summary list of commands you can go to [Command Summary]
-
Words that are highlighted with a grey background represent a
command
that is present or used in the application. -
Words that are highlighted in white represent a kbd:[keyboard] button that can be pressed to invoke a described function.
Brings up calendar view, with all duties for the current month.
Format: viewCurrent
Brings up calendar view, with all duties for the next month.
Format: viewNext
The user can block dates and set which dates they are unavailable to duties for the upcoming month. A user can block up to 15 days.
Format: block DATE DATE DATE …
Note
|
The date entered must be a valid number for the upcoming month. For example if the next month is February, block 30 is an invalid input. |
Warning
|
This command can only be entered if next month’s duty schedule has not been confirmed yet. If it has been confirmed please request a swap on the day you wish to duties. |
If the user has successfully blocked dates they will not be scheduled for duties on the blocked days in the upcoming month.
Example:
-
block 3 6 15 21 30
The user can view the dates they have blocked for the upcoming month.
The blocked dates for the upcoming month will then be printed out for the user to see.
Format: viewblock
The user can remove the dates they have blocked for the upcoming month. This will remove all blocked days from the upcoming month.
Format: removeblock
Note
|
A specific date cannot be removed from the list of blocked dates. If a user wishes to remove only a certain day he can removeblock and run the block command again. |
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
The block dates feature is facilitated by PersonnelDatabase and was implemented for general users as they cannot be expected to do duties any time during the upcoming month. They may have certain dates that are busy or do not wish to do duties and as such they can block the dates in the PersonnelDatabase.
Block Dates was done by adding 3 new commands to the Logic
which are BlockDateCommand
, ViewBlockCommand
, RemoveBlockCommand
.
Modifications and methods were also added in Model
and Storage
to implement the blocking of dates in Duty planning and storage.
BlockDateCommand
works like other commands in the Duty Planner. The command is read a text string from the MainWindow in UI.
The sequence diagram for the interaction is below.
Step 1 :
As seen in the diagram above. The MainWindow calls the execute Command in Logic and passes in the command text, userName and userType of the logged in user.
Step 2 :
The LogicManager then passes the command text, userName and userType to PersonnelDatabaseParser and it determines the type of command by parsing the String input.
Using certain command words, the PersonnelDatabase Parser determines what the command is and then passes the parsed commandText, userName and userType to the BlockDateCommandParser.
Step 3 :
The BlockDateCommandParser
The BlockDateCommandParser takes in the dates list as a String and parses it into a Integer List which is used in the model.
The BlockDateCommandParser then passes in the Integer List, userType and userName to BlockDateCommand.
It checks for valid Integer inputs for days in the next month and will throw an exception if the dates entered are not valid
Step 4 :
The logic for BlockDateCommand follows the activity diagram below.
-
The first check is the userType, if you are an Admin you will not be able to access this command
-
The second check is to see the schedule has already been confirmed for nex month. If so the user cannot block any dates for the upcoming month
-
The third check is to see the number of dates blocked and if they are more than 15, an exception will be thrown. This is to ensure that commander have enough people to schedule duties. You can change this number if you wish to do so by updating the MAX_BLOCKS_NUMBER in BlockDateCommand
-
If the user passes all check the Command will enter Step 5
Step 5 :
The BlockDateCommand then passes the Integer List to the model where it is stored in a Hashmap in DutyMonth.
DutyMonth has a Hashmap<Person, List<Integer>> blockedDays object to allow it to store the blockedDays of every person for the upcoming month.