| Version 1 (modified by , 5 hours ago) ( diff ) |
|---|
Clone an existing build
Actors
User, Admin
Scenario
- The user opens the completed builds page, opens the details popup for a build
- The user clicks on the "CLONE & EDIT" button and is redirected to the forge page
- The forge is populated with identical data as the build that was cloned
BEGIN; SELECT * FROM build WHERE id = $buildId LIMIT 1; INSERT INTO build (user_id, name, created_at, description, total_price, is_approved) SELECT $userId, (b.name || ' (copy)'), CURRENT_DATE, b.description, b.total_price, false FROM build AS b WHERE b.id = $buildId RETURNING id; SELECT component_id FROM build_component WHERE build_id = $buildId; INSERT INTO build_component (build_id, component_id) SELECT $newBuildId, bc.component_id FROM build_component AS bc WHERE bc.build_id = $buildId; COMMIT;
Attachments (3)
- clonedBuild.png (142.5 KB ) - added by 3 hours ago.
- clickClone.png (221.9 KB ) - added by 45 minutes ago.
- clone.png (203.5 KB ) - added by 44 minutes ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.
