Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new task is not very smooth #9326

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Creating a new task is not very smooth #9326

merged 2 commits into from
Jan 3, 2025

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Jan 2, 2025

"'TODO'" is the default value from the database and must be escaped in the frontend. The issue was revealed by the "status" field of Tasks but it would have been the same for the others

fix #9210

@guillim guillim self-assigned this Jan 2, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Modified the default value handling in task creation to properly handle quoted strings from the database, specifically addressing the 'TODO' default value escaping issue.

  • Added stripSimpleQuotesFromString utility in generateDefaultFieldValue.ts to properly handle quoted default values
  • Modified default value processing logic to apply string cleanup before type-specific handling (uuid/now cases)
  • Ensures consistent handling of default values across field metadata types in frontend display

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@ijreilly ijreilly merged commit 8b7e4dd into main Jan 3, 2025
23 checks passed
@ijreilly ijreilly deleted the fix-9210 branch January 3, 2025 10:14
Copy link
Contributor

github-actions bot commented Jan 3, 2025

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-5fc5bdb8.json

Generated by 🚫 dangerJS against 350ea8c

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

Successfully merging this pull request may close these issues.

Creating a new task when "Done" section is visible is not very smooth
2 participants