Skip to main content

Module requests

Module requests 

Source
Expand description

Engineering change requests (ECR): the step before a change order.

  anybody signed in            CAD editors of the affected groups / admins
  ─────────────────            ───────────────────────────────────────────
  raise ──▶ new ──▶ in_triage ──▶ accepted ──▶ create / link change order (ECO)
             │          │    ──▶ rejected               │
             │          │    ──▶ deferred ──▶ in_triage │ change order released
             └──────────┴──▶ withdrawn (requester)      ▼
                                                   implemented

Anyone who finds a problem – shop floor, simulation, test, purchasing, viewers included – raises a request and discusses it. CAD editors of the project groups of the affected items (or admins) triage and decide. An accepted request is implemented by a change order: either one created from the request (with the in-work revisions of the affected items) or an existing open one that is linked. When a linked change order is released, the request becomes implemented in the same transaction (on_change_released, called from changes::review).

Structs§

Abilities
What the actor may do with a request – the services enforce the same rules; the web UI, the API and the desktop app show the matching actions.
AffectedItem
An affected item, optionally with the revision the problem was found in.
CreatedChange
Result of create_change.
RequestFilter
Filters of the request list.
RequestInput

Constants§

MAX_ATTACHMENTS
At most this many attachments per request.
MAX_ATTACHMENT_BYTES
Largest attachment (screenshot, mark-up, PDF report).
MAX_ITEMS
At most this many affected items per request.

Functions§

abilities
abilities_of
Loads the abilities of actor on a request (for pages and API responses).
add_attachment
Attaches an image or PDF to an open request. Everybody who may comment may attach.
add_item
assign
Assigns the request to a CAD editor or admin (None = nobody).
assigned_to
Open requests assigned to the actor (worklist).
attachment
An attachment of a request the actor may see.
attachments
check_item_count
Rejects a list of more than MAX_ITEMS distinct affected items. Callers that resolve item references one by one (the REST API) drop repeated references and check this first, so a long list costs no lookups; create drops repeated items (one row per item, the first mention wins) and checks again.
clean_filename
A safe display name: the last path component without control characters.
comment
Adds a comment to the discussion. Every signed-in user may comment.
comments
The discussion, oldest first.
create
Raises a change request. Every signed-in user may do this, viewers included. The requester watches it from now on.
create_change
Creates the draft change order of an accepted request with the in-work revisions of the affected items, all in one transaction. Items without a revision in work (or whose revision is in another open change, or in a project group of which the actor is no member) are skipped and reported.
decide
Accepts, rejects or defers a request. Rejecting and deferring need a reason. In a group whose review policy has requester_cannot_decide, the requester may not decide (403) – an administrator neither.
delete_attachment
Removes an attachment (its uploader or an admin, while the request is open).
for_change
The requests a change order implements (those the actor may see).
get
A request the actor may see; hidden requests answer like missing ones.
get_by_number
A request by number, if the actor may see it.
items
The affected items; items the actor may not see are placeholder rows (without identity and note), listed last.
link_change
Links an existing open change order to an accepted request.
linked_changes
The change orders that implement a request and that the actor may see, plus the number of those it may not see.
list
Change requests the actor may see (see access::request_visible); the total counts the same rows.
may_triage
Whether actor triages and decides a request on items of these project groups: admins always, CAD editors who are members of one of them (any CAD editor while no item is affected yet), viewers never.
open_by
Open requests raised by the actor (worklist).
open_for_item
Open requests on an item the actor may see (revision page, desktop app).
parse_due_date
Parses an optional due date (YYYY-MM-DD; empty = none).
project_ids
Project groups of the affected items (None = item without a group).
remove_item
reopen
Takes a deferred request up again (deferred → in triage).
sniff_attachment
The content type of an allowed attachment, decided by its first bytes (never by the name or the type the client claims): PNG, JPEG, GIF, WebP or PDF. SVG and everything else are refused.
start_triage
Starts the triage (new → in triage); an unassigned request is assigned to the triaging user.
status_of
update
withdraw
The requester (or an admin) takes the request back before the decision.