Defect date field in forms
Closed this issue · 10 comments
Environment (Required on creation)
Camunda 7.19-7.22
JDK 17
Camunda run 7.21.0
Camunda Modeler 5.23
Tested on Edge and Chrome
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
I run into an issue with the date field in a form. When i am starting the task, the date field appears but i can’t save any entered value. If i set the field on required, i can’t complete the task, no matter of the input in the field. Also, the datepicker popup does not appear, like in the preview of the Modeler. The other input fields seem to work.
Steps to reproduce (Required on creation)
From my GitHub project start the process 'Thesis' and enter data to proceed.
Observed Behavior (Required on creation)
Date field pop-up does not work, if set on required can't proceed
Expected behavior (Required on creation)
Date field popup works and after entering a date, completion of the form is possible
Root Cause (Required on prioritization)
flatpickr
, a transitive dependency of form-js
is not available after the webpack build. Gets tree shaken.
In 7.19 it looks like only the styles are missing, the date picker is kind of shown:
Solution Ideas
Add flatpickr
to the webpack config similar to preact-markup
and co.
Hints
Links
Forum
https://forum.camunda.io/t/form-date-field-not-working-properly/52873
GitHub
https://github.com/tzmn27/Thesis
Breakdown
Dev2QA handover
- Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
Hi @tzmn27,
Thank you for reporting a bug and providing an example as well!
I will test it soon and provide more feedback.
-Daniel
Hi @tzmn27,
I updated the issue. It is indeed a bug in our packaging.
We will prioritize this and then provide a fix.
-Daniel
@tasso94, assigning for prioritization. It's a bug with date fields in forms. It's happening with all webpack versions and 7.19 also contains a styles bug with flatpickr.
Thanks! Let's try to fix it in the course of 7.22.0. We can consider backporting it.
Merged to master, will keep in review until decided to be backproted or not.
Moved to QA, will not be back ported unless required by customer.
@danielkelemen, do you have any idea why we have these tree-shaking issues only with form-js and not with any other library? 🤔
camunda-bpm-platform/webapps/frontend/webpack.common.js
Lines 100 to 111 in f37877b
@danielkelemen, do you have any idea why we have these tree-shaking issues only with form-js and not with any other library? 🤔
@tasso94, no idea. The CommonJS file is defined in their package properly, flatpickr
is required and used.
Tested on: camunda-bpm-run-ee-7.22.0-20240817.170611-72
Also added an e2e test to validate the functionality of the datepicker on camunda forms