Skip to content

fixed addition of application to folder more than once - #2961

Merged
Navaneeth-pk merged 2 commits into
ToolJet:developfrom
ankush-0x90:fix-addition-of-app-in-folders-more-than-once
May 5, 2022
Merged

Navaneeth-pk merged 2 commits into
ToolJet:developfrom
ankush-0x90:fix-addition-of-app-in-folders-more-than-once

Conversation

@ankush-0x90

Copy link
Copy Markdown

Fixes #2916

Please review and let me know if any changes are required.

Tests

  • Manually Tested on local
  • Test Case written

Screenshots

test

Approach

I have used repository to find if record already exists by querieng before creating folderApp record, please let me know
if any factory method available which can be used to find if app id is already referenced with folder id which can be used.

@CLAassistant

CLAassistant commented May 3, 2022 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Navaneeth-pk Navaneeth-pk added the run-ci CI is run only when this label is added label May 4, 2022
@Navaneeth-pk

Copy link
Copy Markdown
Collaborator

Please fix the lint errors.
@asprazz

@ankush-0x90

Copy link
Copy Markdown
Author

@Navaneeth-pk Please find it done.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shall we rename the variable something like existingFolderApp? old will be confusing.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes! it should be more informative

@gsmithun4 gsmithun4 May 4, 2022 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if (oldFolderApp)
will be good, we can capture undefined value also

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have added the check. Please check.

@ankush-0x90
ankush-0x90 requested a review from gsmithun4 May 4, 2022 16:04

@gsmithun4 gsmithun4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@gsmithun4

Copy link
Copy Markdown
Collaborator

@Navaneeth-pk
Navaneeth-pk merged commit a07b8e3 into ToolJet:develop May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI is run only when this label is added tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Able to add the same application in a folder multiple times.

5 participants