AY1920S1-CS2103-F09-4 / main

Insurelytics
https://ay1920s1-cs2103-f09-4.github.io/main/
MIT License
1 stars 5 forks source link

Modify assign/unassign policy commands and add tests #99

Closed chaitanyabaranwal closed 5 years ago

chaitanyabaranwal commented 5 years ago

Modify assignpolicy and unassignpolicy commands to use policy name instead of policy index. Also added tests for the two commands and their parsers.

olivercheok20 commented 5 years ago

Not a critical bug, but I thought I'd mention it still. If I first use find to get a filtered list of people, and then use assignpolicy/unassignpolicy, the policy is assigned/unassigned, but the list of people shown reverts to the full list.

For example, if my address book has Alice, Bob and Charlie:

find Alice filters the user-visible list to only Alice assignpolicy 1 pol/Fire Insurance assigns Fire Insurance to Alice, but then resets the user-visible list to everyone (Alice, Bob and Charlie)

If the user wants to assign/unassign policies to multiple people in the filtered list, he'll have to keep inputting find Alice, which could be an inconvenience. This could be a problem if there are lots of people named Alice, or if he's searching by surname and is trying to assign/unassign the policies of a whole family of people.