Skip to content

FOUR-31359: Fix clipboard lookup for new users#8890

Open
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-31359
Open

FOUR-31359: Fix clipboard lookup for new users#8890
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-31359

Conversation

@eiresendez

@eiresendez eiresendez commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

A newly created user can hit a 404 Not Found when opening the Screen Builder because the editor initializes clipboard data with GET /api/1.1/clipboard/get_by_user, but new users do not yet have a row in the clipboards table.

Reproduction:

  1. Create a brand new user.
  2. Grant the user permissions to create or design screens.
  3. Log in as that user.
  4. Navigate to Screens and create or open a screen in Screen Builder.
  5. Observe the GET /api/1.1/clipboard/get_by_user request returning 404.

Solution

  • Changed the clipboard lookup endpoint to lazily create an empty clipboard for the authenticated user when one does not exist.
  • Preserved the existing response shape while ensuring the GET endpoint returns 200 OK.
  • Added feature coverage for new users without a clipboard row and users with an existing clipboard row.

How to Test

Automated test run:

  • ./vendor/bin/phpunit tests/Feature/Api/V1_1/ClipboardControllerTest.php

Manual verification:

  1. Ensure the authenticated user has no row in clipboards.
  2. Call GET /api/1.1/clipboard/get_by_user.
  3. Confirm the response is 200 OK with config: [].
  4. Confirm a clipboard row is created for that user.
  5. Call the endpoint again and confirm it returns the existing clipboard without creating duplicates.

Related Tickets & Packages

ci:deploy

@eiresendez eiresendez self-assigned this Jul 1, 2026
@eiresendez eiresendez requested a review from CarliPinell July 1, 2026 14:18
@processmaker-sonarqube

Copy link
Copy Markdown

@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-4cc4bd01a0.engk8s.processmaker.net

@CarliPinell CarliPinell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.
No observations found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants