What it needs to do
- Ask for (or read) the request ID, impact and urgency.
- Work out the priority using the business rules.
- Work out the estimated response timeframe for that priority.
- Build a clear status message that includes the request ID, priority and timeframe.
- Handle a list of requests, not just one (loop through them).
- Cope with input entered in any case (e.g. "high" or "High").
Example output: Request SR-1043 logged as CRITICAL priority — target response within 1 hour.
Business rules
| When | Priority | Response timeframe |
|---|---|---|
| Impact High and Urgency High | Critical | within 1 hour |
| Impact High or Urgency High (not both) | High | within 4 hours |
| Impact Medium and Urgency Medium | Medium | within 1 business day |
| Anything else | Low | within 2 business days |
Sample inputs
| Request | Category | Impact | Urgency | Submitted by |
|---|---|---|---|---|
| SR-1042 | Password reset | Low | Medium | Priya Nair |
| SR-1043 | POS outage | High | High | Marcus Hill |
| SR-1044 | Printer fault | Medium | Low | Ella Zhang |
| SR-1045 | Payroll access | High | Medium | Sam Taylor |
Test cases
| # | Input | Expected priority | Expected timeframe |
|---|---|---|---|
| T1 | SR-1042 · impact Low · urgency Medium | Low | within 2 business days |
| T2 | SR-1043 · impact High · urgency High | Critical | within 1 hour |
| T3 | SR-1044 · impact Medium · urgency Low | Low | within 2 business days |
| T4 | SR-1045 · impact High · urgency Medium | High | within 4 hours |
| T5 | SR-1043 · impact High · urgency "high" (lowercase) | Critical | within 1 hour |
Known issue to fix — Lowercase urgency is treated as Low
When a request’s urgency is entered in lowercase (e.g. "high"), the tool doesn’t match it and falls through to Low priority.
- Sample input
- SR-1043 · impact High · urgency "high"
- Expected
- Critical — within 1 hour
- Actual
- Low — within 2 business days
Hint: The comparison is case-sensitive. Normalise impact and urgency (e.g. convert to a consistent case) before comparing, so test T5 passes.
Feedback from IT Coordinator (Priya Naidu)
- Good start — the message format reads well.
- Please confirm it returns the right answer for all five test cases, including the lowercase one.
- Add a short comment explaining the priority rules so the next person can follow it.
- When it’s working, send a one-line handover note confirming it meets the spec.