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

Validate duration literals #4800

Open
barmac opened this issue Jan 21, 2025 · 1 comment
Open

Validate duration literals #4800

barmac opened this issue Jan 21, 2025 · 1 comment
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers spring cleaning Could be cleaned up one day ux

Comments

@barmac
Copy link
Collaborator

barmac commented Jan 21, 2025

Problem you would like to solve

It is absolutely frustrating when you get a runtime error for incorrect duration value, e.g. duration("PTS15"). One needs to be an ISO8601 expert to spot the problem here.

Proposed solution

Validate this! We can easily validate the duration("...") string literal part with a regex. We already do that in in dmn-js, so why don't we do that everywhere? This should be implemented at feel-lint level as it supports any FEEL editor user.

This will support "Editors, not drawing writing tools".

Alternatives considered

Do nothing and let the users suffer.

Additional context

This conversation: https://camunda.slack.com/archives/C057H178R9T/p1737455728395989

@barmac barmac added enhancement New feature or request ux spring cleaning Could be cleaned up one day labels Jan 21, 2025
@nikku
Copy link
Member

nikku commented Jan 22, 2025

If tackled this should be fixed in feel-lint, where we already host another rule: https://github.com/bpmn-io/feel-lint/blob/main/rules/first-item.js.

Should not only be solved for string input to date, date and time and time fields, but also for AtLiterals, the modern way to create date and time values: `@"2019-03-31".

@nikku nikku added the good first issue Good for newcomers label Jan 22, 2025
@barmac barmac added the backlog Queued in backlog label Feb 4, 2025 — with bpmn-io-tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers spring cleaning Could be cleaned up one day ux
Projects
None yet
Development

No branches or pull requests

2 participants