Skip to content

QUE · Registration queue

A walk-in takes a ticket, staff call it, and the ticket becomes a driver. Every call, skip and conversion is a queue_events row. Code QUE.

D61 names three flows that must not break on the first Monday after cutover: driver onboarding (the queue to an approved driver), vehicle onboarding (a new car to ready) and collection (an overdue driver to a call, a surat hutang and a payment). Their rules get the most tests, refusals included, and the hardest review. On this page:

  • Driver onboarding: R-QUE-01 to R-QUE-12: every rule on this page.

These questions are open in #80. Each gets a rule with a new ID once it is answered.

  • QUE open 2 · Joining by QR
  • A closed ticket's status. V13's queue_status has no value for a ticket closed after max_queue_miss skips (R-QUE-06). BE pack G2 didn't add one; it comes with R-QUE-06 in M3.

R-QUE-01 · A ticket number is unique per pool and queue date

Section titled “R-QUE-01 · A ticket number is unique per pool and queue date”
  • Status: built
  • Example: given ticket 12 at PML on 2026-10-07, when a second ticket 12 is saved for PML that day, then it is refused; ticket 12 at SBY, or at PML the next day, is accepted.
  • Refusal: none: unique_violation (23505).
  • Who: every writer.
  • Source: D9 (P4).

R-QUE-02 · A ticket's queue date is the pool's local date

Section titled “R-QUE-02 · A ticket's queue date is the pool's local date”
  • Status: planned
  • Example: given a pool in Asia/Jayapura (WIT), when a ticket is taken at 07:30 WIT on 8 October, which is 22:30 UTC on 7 October, then its queue date is 2026-10-08.
  • Refusal: none.
  • Who: the queue functions.
  • Source: D9 (P11); [Ref] Data model V13: queue_tickets.

R-QUE-03 · A queue ticket becomes at most one driver

Section titled “R-QUE-03 · A queue ticket becomes at most one driver”
  • Status: built
  • Example: given ticket 12 converted to driver A, when it is linked to driver B as well, then it is refused.
  • Refusal: none: unique_violation (23505).
  • Who: every writer.
  • Source: [Ref] Data model V13: queue_tickets.driver_id.

R-QUE-04 · Reading queue tickets needs queue:read at their pool

Section titled “R-QUE-04 · Reading queue tickets needs queue:read at their pool”
  • Status: built
  • Example: given a checker at PML, when they read queue_tickets, then nothing comes back; an admin_driver at PML sees the day's queue.
  • Refusal: none: hidden.
  • Who: super_admin, admin, admin_driver and viewer hold queue:read.
  • Source: [Ref] Roles, policy matrix.

R-QUE-05 · Adding or changing a queue ticket needs driver:write at its pool

Section titled “R-QUE-05 · Adding or changing a queue ticket needs driver:write at its pool”
  • Status: built
  • Example: given a viewer at PML, when they call a ticket, then nothing changes; an admin_driver at PML may.
  • Refusal: none: insufficient_privilege (42501) on insert; no effect on update.
  • Who: super_admin, admin and admin_driver hold driver:write.
  • Source: [Ref] Roles, policy matrix.

R-QUE-06 · A ticket skipped max_queue_miss times is closed and can't be called again

Section titled “R-QUE-06 · A ticket skipped max_queue_miss times is closed and can't be called again”
  • Status: planned
  • Example: given max_queue_miss is 3 at PML, when ticket 12 is skipped for the third time, then it is closed and leaves the call list; after one or two skips it goes back to the list (DRV-05 → DRV-03).
  • Refusal: a key named by BE in M3, when a closed ticket is called.
  • Who: the queue call function (M3).
  • Source: D43; General Flow DRV-05 (miss_count, MAX_QUEUE_MISS); R-SET-08.

R-QUE-07 · A NIK has at most one open queue ticket in the organization

Section titled “R-QUE-07 · A NIK has at most one open queue ticket in the organization”
  • Status: planned
  • Example: given ticket 12 at PML for NIK 3275011234567890, still waiting, when the same NIK takes a ticket at SBY, then it is refused; once ticket 12 is converted or closed, a new ticket is accepted. Waiting, called, in progress and skipped tickets are open.
  • Refusal: none: unique_violation (23505).
  • Who: every writer. The ticket records the NIK the driver gives (DRV-02), a column BE pack G2 adds.
  • Source: D43; General Flow DRV-02 (Data Constraints: one open entry per NIK).

R-QUE-08 · A blacklisted driver's NIK can't take a queue ticket

Section titled “R-QUE-08 · A blacklisted driver's NIK can't take a queue ticket”
  • Status: planned
  • Example: given a blacklisted driver with NIK 3275011234567890, when that NIK takes a ticket at the public queue page, then it is refused and no ticket is made.
  • Refusal: driver.blacklisted
  • Who: the queue function, the public /antrian page included (M3).
  • Source: D43; General Flow DRV-02, DRV-27.

R-QUE-09 · A queue ticket records the walk-in's emergency contact, education and birth date, as v1's queue form does

Section titled “R-QUE-09 · A queue ticket records the walk-in's emergency contact, education and birth date, as v1's queue form does”
  • Status: planned
  • Example: given a walk-in at the public queue page, when they take a ticket, then the ticket holds the emergency contact's name and phone, the walk-in's education and birth date with the rest of the form; the page asks for them in Indonesian only (D29).
  • Refusal: none.
  • Who: the queue function and the public /antrian page (M3). They are personal data, kept and anonymized as the driver's are (D15).
  • Source: D55 (OQ8: "make it same as v1"). The columns are added in BE pack G2, so the data phase can map v1's queue rows onto them.

R-QUE-10 · Registering a lead from a ticket copies its emergency contact, education and birth date to the driver

Section titled “R-QUE-10 · Registering a lead from a ticket copies its emergency contact, education and birth date to the driver”
  • Status: planned
  • Example: given ticket 12 with an emergency contact, education SMA and birth date 1990-05-01, when it is converted to a driver, then the driver has that emergency contact, that education and that birth date.
  • Refusal: none.
  • Who: the lead registration function (M3).
  • Source: D55.

R-QUE-11 · The queue TV reads only a ticket's number, its status and the counter it is called to

Section titled “R-QUE-11 · The queue TV reads only a ticket's number, its status and the counter it is called to”
  • Status: planned
  • Example: given the queue TV of PML, when it reads the day's queue, then it gets ticket numbers, statuses and counters, and no name, NIK, phone, birth date or other personal data.
  • Refusal: none: the TV's view has no other column.
  • Who: the queue TV (M3).
  • Source: D58; D55 (the new fields never reach the TV); D15.

R-QUE-12 · The queue TV shows a called ticket the moment it is called, without reloading

Section titled “R-QUE-12 · The queue TV shows a called ticket the moment it is called, without reloading”
  • Status: planned
  • Example: given the queue TV open at PML, when staff call ticket 12 to counter 2, then the TV shows 12 at counter 2 within a moment, with no reload and no timer.
  • Refusal: none.
  • Who: the queue TV (M3), through Supabase Realtime, switched on in config.toml for it.
  • Source: D58 (OQ13).

R-QUE-13 · The queue's opening hours and the tickets per phone are settings that nothing enforces; max_queue_miss is enforced

Section titled “R-QUE-13 · The queue's opening hours and the tickets per phone are settings that nothing enforces; max_queue_miss is enforced”
  • Status: planned
  • Example: given the queue closes at 16:00 and a driver takes a ticket at 17:00, or a phone already holds its fourth ticket, then the ticket is saved all the same; an alert for these can come in M3. A ticket skipped max_queue_miss times is still closed (R-QUE-06). queue_open, queue_opens_at, queue_closes_at and max_tickets_per_phone stay settings.
  • Refusal: none.
  • Who: the ticket functions (M3).
  • Source: the CTO's proposal on #236 (2026-10-26), accepted by zuki on 2026-11-02; D43; R-QUE-06, R-SET-08.