google-code-export / sandy-disaster-recovery

Automatically exported from code.google.com/p/sandy-disaster-recovery
2 stars 2 forks source link

Icon Color Logic #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
After several attempts to write this logic as a code, I realized that it was 
just easier (if messy) to write the logic as a series of if-then statements for 
each case, since there were a limited number of cases.

In some cases, changing a status will affect the claimed status, but not always 
vice-versa.  Changing status to some "Closed" statuses should prompt for 
volunteer hours, while assigning a work order should prompt for the Team 
Leader's name and phone number.

FIRST: RE-NAME/CREATE A FEW STATUSES
1. Rename "Closed, out of scope" to "Rejected, out of scope"
2. Rename "Closed, rejected" to "Rejected, low priority"
3. Rename "Closed, duplicate" to "Rejected, duplicate"
4. Create new status: "Open, not ready". This will be used in the future to 
indicate to a rebuilding organization that a place needs mucking out, and is 
therefore not quite ready for rebuilding.

SECOND: SET COLORS/ STATUSES/ AUTO-CLAIMING
--Unclaimed--
* If Unclaimed and "Open, unassigned": Red.
* If Unclaimed and "Open, needs follow-up": Red.
* If Unclaimed and "Open, assigned": 1. Change to Claimed. 2. Display Message 
"A". 3. Follow instructions for "Claimed" below.
* If Unclaimed and "Open, partially completed": 1. Change to Claimed. 2. 
Display Message "A". 3. Follow instructions for "Claimed" below.
* If Unclaimed and "Open, not ready": Red (for now).
* If Unclaimed and "Closed": 1. Change to Claimed. 2. Display Message "A". 3. 
Follow instructions for "Claimed" below.
* If Unclaimed and "Rejected": 1. Change to Claimed. 2. Display Message "A". 3. 
Follow instructions for "Claimed" below.

--Claimed--
* If Claimed and "Open, unassigned": Orange.
* If Claimed and "Open, assigned": 1. Yellow. 2. On map, Prompt for "Team 
Leader: [Name]" and "Phone: [Team Leader phone number]". Note- these are new 
fields that should also be added to the Work Order form at the end of the 
"Claim, Status and Report" section.
* If Claimed and "Open, partially completed": 1. Orange. 2. On map, Prompt for 
volunteers, hours, and Initials of resident present.
* If Claimed and "Open, needs follow-up": Orange.
* If Claimed and "Open, not ready": Orange.
* If Claimed and "Closed, completed": 1. Green. 2. On map, Prompt for 
volunteers, hours, and Initials of resident present.
* If Claimed and "Closed, incomplete": 1. Green. 2. On map, Prompt for 
volunteers, hours, and Initials of resident present.
* If Claimed and "Closed, done by others": Green
* If Claimed and "Closed, no help wanted": xGray
* If Claimed and "Rejected, out of scope": xGray
* If Claimed and "Rejected, low priority": xGray
* If Claimed and "Rejected, duplicate": Invisible

If someone Unclaims a claimed work order, and the status is "Open, Assigned," 
"Rejected, out of scope", "Rejected, low priority" then the status should 
automatically change to "Open, Unassigned."  Display Message "B".

MESSAGE A: "Changing the status requires your organization to claim the work 
order. This work order has been claimed for your organization."
MESSAGE B: "Warning: Unclaiming this work order changed its status to "Open, 
unassigned."

This is important as organizations are now beginning to clean up work orders.

Original issue reported on code.google.com by v...@aarontitus.net on 11 Dec 2012 at 6:24

GoogleCodeExporter commented 9 years ago

Original comment by v...@aarontitus.net on 1 Jan 2013 at 7:32

GoogleCodeExporter commented 9 years ago
How should this logic be changed to handle the statuses of multiple phases? 
(issue 134 and issue 139)

Show maximal/'worst' colour/icon?

Original comment by cpw...@gmail.com on 5 Feb 2013 at 6:00

GoogleCodeExporter commented 9 years ago
Or go down the road of combining or stacking icons? Probably too complex.

Original comment by cpw...@gmail.com on 5 Feb 2013 at 6:01

GoogleCodeExporter commented 9 years ago
Currently, there is only one map, and everyone sees exactly the same thing.  In 
a future version, each organization will have an organization-centric view of 
the map.  For example, Org A signs up for an incident and says, "We do 
Assessment and Muckouts, but nothing else."  Org B says, "We do rebuilding and 
refurbishing, and nothing else."

Hypothetical Work Order A123 needs to be mucked out.  Org A does the assessment 
and it gets put on the map.  Org A logs in, and it appears Red, because it is 
ready to be claimed and mucked out.  However, when Org B logs in, it either 
doesn't appear, or appears Gray.  Org A assigns the work order, completes it, 
and marks it complete.  To Org A, the work order appears green.  But now that 
it is ready for the next phase, it appears as Red on Org B's screen, because it 
is unclaimed for the next phase, and ready to be rebuilt.

So the answer to the question is: Organization-specific views of the map. Does 
that help?

This means we may need to change the logic above:
* If Unclaimed and "Open, not ready": Red (for now).

See Issue 21 #14

Original comment by v...@aarontitus.net on 5 Feb 2013 at 7:08

GoogleCodeExporter commented 9 years ago
Understood - but what happens when an organisation has multiple specialities, 
e.g. Org C does assessments, muckouts, rebuilding and refurbishing etc.?

What does Org C see in your example? If only a single icon is shown, I would 
assume it would be the icon of the maximal status of all relevant phases (eg. 
if phase 1 is red and phase 2 is green and both are relevant to Org C, show red 
to Org C).

In the short term, this logic could also be used for the single, one-view map.

Original comment by cpw...@gmail.com on 6 Feb 2013 at 11:23

GoogleCodeExporter commented 9 years ago
I am creating a .pptx illustrating how this is to work in practice.  It still 
needs some work, but once it's ready, I'll post it here.

Original comment by v...@aarontitus.net on 7 Feb 2013 at 2:33

GoogleCodeExporter commented 9 years ago
Here is the PowerPoint. I distributed this via email earlier. It isn't perfect, 
but provides a starting point.

Original comment by v...@aarontitus.net on 27 Feb 2013 at 4:08

Attachments: