From 313338899ecbd7e44c6803fe95f48771f2cc70f1 Mon Sep 17 00:00:00 2001 From: Anagh Hegde Date: Wed, 17 Apr 2024 20:55:06 +0530 Subject: [PATCH] fix: Unable to publish forked app to community portal (#32671) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description The publish to community template flow does not allow users to publish the same app multiple times to the portal. This is controlled via a boolean flag in the Application object. But when the user forks this app, it should be allowed for the new application to be published. This PR fixes this issue by making sure the flag value is reset to null during the fork flow. Fixes https://github.com/appsmithorg/appsmith/issues/32221 ## Automation /ok-to-test tags="tag.Templates" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 23acf129c6da337c8a198cdca63a1b0b3fbc9444 > Cypress dashboard url: Click here! --- .../server/fork/internal/ApplicationForkingServiceCEImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/fork/internal/ApplicationForkingServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/fork/internal/ApplicationForkingServiceCEImpl.java index 39e98c3532..837ac01723 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/fork/internal/ApplicationForkingServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/fork/internal/ApplicationForkingServiceCEImpl.java @@ -516,6 +516,7 @@ public class ApplicationForkingServiceCEImpl implements ApplicationForkingServic application.setPages(new ArrayList<>()); application.setPublishedPages(new ArrayList<>()); application.setIsPublic(false); + application.setIsCommunityTemplate(false); Mono userMono = sessionUserService.getCurrentUser();