Skip to content

(V2 post-mvp) Drag and Drop: Add 'position' column #264

@ethoreson

Description

@ethoreson

4 parts, this issue will need to be split later:

  1. Add an INT column to PrintJobs table: 'position'. Only printjobs with a queueing status can be rearranged, otherwise 'position' will be null & drag/drop not enabled on frontend. INTs will be 10 #s off from the last created (see Create Endpoints for Analysis View #4).
  2. GET request, /api/print-jobs/{printId}/position - When a queued item is moved up or down, it will get the position number of its new ceiling and floor neighbors, and its new position will split the difference between those INTs.
  3. Update the PUT /api/print-jobs/{printId} request to include 'position' as another valid attribute change.
  4. When a new card is created, its position should be +10 of the highest current position.

UNSURE:

  • What happens 6 months down the road, should we reset positions to restart at 0 at a certain point?
  • Would changing from INT to DECIMAL be overkill, or necessary?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions