Overview
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.
Summary of contributions
-
Major enhancement: model and storage of Duty system as a whole
-
What it does: Duty system is a whole new feature added into the system to represent the real-life duty allocation system used in the army and other organisations. The duties created can also be saved and loaded just like the list of personnels.
-
Justification: This feature is the main focus of our project as a Duty Planner, as we need an effective system and model of duties in order to introduce new commands that deal with them.
-
Highlights: This enhancement required creating new classes solely for the purpose of building, managing and storing the duties. The duty system has also been added to the existing address book class (renamed to personnel database), which now contains DutyCalendar class as an attribute.
-
Credits: {Fellow teammate Pan Yongjing for working together on the DutyMonth and Duty classes}
-
-
Minor enhancement: added a view command that allows the users to check his own list of duties as well as his fellow soldiers'.
-
Other contributions:
-
Project management:
-
Set up the group Github account and the main repository
-
Set up Travis testing within our own repository
-
-
Enhancements to existing features:
-
Updated test cases to cater to the new attributes introduced to the Person class (Pull requests https://github.com/CS2103-AY1819S2-W15-4/main/pull/62, https://github.com/CS2103-AY1819S2-W15-4/main/pull/63, https://github.com/CS2103-AY1819S2-W15-4/main/pull/66)
-
CalenderUtil class added to the commons folder to aid in date related operations (Pull request https://github.com/CS2103-AY1819S2-W15-4/main/pull/100)
-
-
Documentation:
-
Added our group profile pictures to the AboutUs: (Pull requests https://github.com/CS2103-AY1819S2-W15-4/main/pull/5, https://github.com/CS2103-AY1819S2-W15-4/main/pull/8, https://github.com/CS2103-AY1819S2-W15-4/main/pull/9)
-
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
View duties assigned to user : view
The user can see their details about their own duties assigned to them and their upcoming duties ranked by recency.
Format: view
View duties assigned to other users : view
The user can see the details of duties assigned to another user by keying in their NRIC.
Format: view NRIC
Example:
-
view S9012345L
Log Out: logout
coming in v2.0
Logs the user out of the program without exiting.
Format: logout
Manually replace a person in the duty : replace
coming in v2.0
Replaces the particular person assigned to the duty with the given person.
Format : replace d/DUTYDATE(DDMMYY) o/NRIC n/NRIC
If the person the user is trying to replace with is already assigned to that particular duty, the system will throw an exception. Both the person getting replaced and the person replacing have to be present in the database.
Example:
-
replace d/140219 o/S9012345L n/G9043214N
Replaces the person with NRIC S9012345L in duty on 14th Feb 2019 with the person with NRIC G9043214N.
A confirmed duty schedule can be viewed on the calendar (using the viewNext
command). Duty points will be updated accordingly to reward those who were assigned duties.
Contributions to the Developer Guide
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. |
Model component
API : Model.java
The Model
,
-
stores a
UserPref
object that represents the user’s preferences. -
stores the Duty Personnel data.
-
stores the implementation of the Calendar and DutyDates.
-
stores the implementation of a Duty Personnel.
-
exposes an unmodifiable
ObservableList<Person>
that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. -
does not depend on any of the other three components.
As a more OOP model, we can store a Tag list in Personnel Database , which Person can reference. This would allow Personnel Database to only require one Tag object per unique Tag , instead of each Person needing their own Tag object. An example of how such a model may look like is given below. |
Storage component
API : Storage.java
The Storage
component,
-
can save
UserPref
objects in json format and read it back. -
can save the Personnel Database data in json format and read it back.
Duty Calendar
DutyCalendar
is an attribute of PersonalDatabase
. It comprises of three DutyMonth
objects — namely currentMonth
, nextMonth
and dummyNextMonth
and a DutyStorage
object — dutyStorage
.
-
currentMonth
represents the current month. -
nextMonth
represents the upcoming month. -
dummyNextMonth
is a dummyDutyMonth
object that mirrors the contents ofnextMonth
.-
It is instantiated each time
schedule
command is called. The scheduling alogorithm is invoked to produce a viable duty schedule indummyNextMonth
. -
When
confirm
command is called,nextMonth
will point to thedummyNextMonth
.
-
-
dutyStorage
stores the accumulated duty points and duty records of each person.
DutyCalendar
implements the following operations:
-
DutyCalendar#rollover()
— replacescurrentMonth
withnextMonth
and a newnextMonth
object will be instantiated.rollover()
will be called automatically when the application begins and thecurrentMonth
object no longer correspond to the actual current month in real time. -
DutyCalendar#scheduleDutyForNextMonth()
— instantiatesdummyNextMonth
and runs the scheduling algorithm on it. -
DutyCalendar#confirm()
— confirms the latest duty schedule by allowingnextMonth
to point to the current instantiation ofdummyNextMonth
.
Appendix A: User Stories
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a(an) … | I want to … | So that I can… |
---|---|---|---|
|
admin |
see Admin Help |
refer to instructions specific to the administrator privileges |
|
admin |
choose 2 users to swap duties |
allow them to have their desired duty slot |
|
admin |
schedule the duties automatically |
save time on scheduling |
|
admin |
make sure that the scheduling is correct and fair |
|
|
admin |
promote a general user to an admin |
let the user do admin work |
|
admin |
add a new person |
|
|
admin |
delete a person |
remove entries that I no longer need |
|
admin |
let only admins to use certain commands |
the database will be protected |
|
user |
log in |
access my information |
|
new user |
see usage instructions |
refer to instructions when I forget how to use the App |
|
user |
find a person by name |
locate details of persons without having to go through the entire list |
|
user |
request an administrator to swap duty with another person |
get my desired duty |
|
user |
hide private contact details by default |
minimize chance of someone else seeing them by accident |
|
user with many persons in the personnel database |
sort persons by name |
locate a person easily |
|
user |
block certain dates |
choose not to do duty on certain dates |
|
user with duties |
see my own duties |
|
|
visual user |
see all the duties in a user-friendly form |
understand the whole better |
|
general user |
edit my own details |
|
|
general user |
view my blocked dates |
Use case 2 (Admin): Delete person after schedule for next month is confirmed
MSS
-
PersonnelDatabase already has confirmed duty schedule
-
User requests to list persons
-
PersonnelDatabase shows a list of persons
-
User requests to delete a specific person in the list
-
PersonnelDatabase deletes the person
-
PersonnelDatabase deletes the confirmed duty schedule
-
PersonnelDatabase asks the user to schedule the duties again
Use case ends.
Extensions
-
2a. The given index is invalid.
-
2a1. PersonnelDatabase shows an error message.
Use case resumes at step 3.
-
Use case 5 (Admin): Schedule duties
MSS
-
User requests to schedule duties for the upcoming month.
-
PersonnelDatabase shows the list of duty personnel and duties for the upcoming month.
Use case ends.
Extensions
-
2a. The user does not exist.
-
2a1. PersonnelDatabase shows an error message indicating that no such user is found.
Use case ends.
-
-
2b. The user does not have any duties.
-
2b1. PersonnelDatabase shows an error message indicating that the user is not assigned to any duties.
Use case ends. Extensions
-
Use case 6 (Admin): Clear all the database, including duties
MSS
-
Admin requests to clear all personnel and duties from database.
-
All data including personnel and upcoming duties is wiped and shown on the MainWindow UI.
Use case 7 (Admin): Approve swapping of duties
MSS
-
The user logs into the system.
-
PersonnelDatabase shows a list of swap requests.
-
The user approves a swap request.
-
PersonnelDatabase swaps the corresponding persons in respective duties.
-
PersonnelDatabase deletes the request from the system.
Use case ends.
Extensions
-
2a. There are no duty swap requests.
Use case ends.
Use case 8 (General user): See own duties
MSS
-
User requests to see his own duties.
-
PersonnelDatabase shows all the duties the user is assigned to.
Use case ends.
Extensions
-
2a. The user is the master admin.
-
2a1. PersonnelDatabase reminds the user that the master admin cannot be assigned to duties.
Use case ends.
-
-
2b. The user is not assigned to any duties.
-
2b1. PersonnelDatabase shows an error message indicating that the user is not assigned to any duties.
Use case ends
-