Files
bambuddy/backend
maziggy bec17de946 fix(queue): send the copy count for a cross-model print (issue #3101)
Selecting sliced files for two printer models and asking for 25 copies
    queued one item. The queue emptied as soon as it dispatched and the
    Batches tab stayed empty, because no batch is created at quantity 1.

    A multi-plate file moves the run count off the modal's Quantity field
    onto a stepper beside each plate (#342), hiding the field. The
    cross-model submit (#671) posts that field, which in this combination
    nothing can set, so it stayed at its initial 1. The modal read "19 runs
    in total" above a button that queued one.

    Per-plate steppers do not fit a cross-model job: its plate is chosen per
    candidate, in the alternatives list, so there is one number to give.
    Exclude cross-model from the per-plate mode and the global field comes
    back.

    Drop the plate selector in that mode too. Its choice never reached the
    request; it only keyed the filament-requirements query, so picking plate
    3 for a candidate while plate 1 stayed ticked above produced overrides
    computed from a plate the job would not print. That query now follows
    the primary file's own dropdown.

    Dispatch needed nothing -- it already gives each copy its own candidate
    rows -- but naming did. A cross-model job carries neither archive_id nor
    library_file_id, because the candidates are the files, so both branches
    that name a batch missed and every such order would have read "Batch" in
    the tab the reporter went looking in. Name it after the first candidate.

    The existing cross-model tests all mock a single-plate file, which is
    why the pair was never covered; the multi-plate case is added.
2026-09-21 15:28:49 +02:00
..