Lut 32733 : display N/A option for empty field#38
Conversation
| -- changeset workflow-formspdf:update_db_workflow-formspdf-2.0.0-2.0.1-rev1.sql | ||
| ALTER TABLE workflow_task_formspdf_template ADD COLUMN file_name VARCHAR(350); | ||
|
|
||
| -- changeset workflow-formspdf:update_db_workflow-formspdf-2.0.0-2.0.1-rev1.sql |
There was a problem hiding this comment.
Use a different changeset id, it will fail at runtime if liquibase is active.
E.g : -- changeset workflow-formspdf:update_db_workflow-formspdf-2.0.0-2.0.1-rev2.sql
There was a problem hiding this comment.
well changing the id is not enough, you must create a new file src/sql/plugins/workflow/modules/formspdf/upgrade/update_db_workflow-formspdf-2.0.1-2.0.2.sql as 2.0.1 is a release and the current version is 2.0.2-SNAPSHOT
So the id of the change should be -- changeset workflow-formspdf:update_db_workflow-formspdf-2.0.1-2.0.2.sql
There was a problem hiding this comment.
Thanks for your feedback.
It's been corrected.
| private void replaceNullEntries( Map<String, Object> model, Locale currentLocale ) | ||
| { | ||
| model.forEach( ( key, value ) -> { | ||
| if ( key.contains( "code_" ) ) |
There was a problem hiding this comment.
Is there any constant in Forms or Core to cover this prefix ? Can't we use entry_code_ a.k.a FormResponseSearchItem.FIELD_ENTRY_CODE_SUFFIX and start with ? is there any other case containing *code_* ? Otherwise, please provide a shared constant in the module.
| private static final String PROPERTY_LABEL_DESCRIPTION = "module.workflow.formspdf.export.pdf.description"; | ||
| private static final String EMPTY_RESPONSE_VALUE = "module.workflow.formspdf.modify.template.replaceEmpty.defaultValue"; | ||
| private static final String FTL_SQUARE_BRACKET_TAG = "[#ftl]"; | ||
| private static final String MARK_POSITION = "position_"; |
There was a problem hiding this comment.
I think we should have shared constants from Forms plugin, and use it in GenericAttributes and this module. It would better to avoid broken changes in the future.
There was a problem hiding this comment.
It's done!
The link to the plugin_form PR : https://github.com/lutece-platform/lutece-form-plugin-forms/pull/639/changes
| private static final String EMPTY_RESPONSE_VALUE = "module.workflow.formspdf.modify.template.replaceEmpty.defaultValue"; | ||
| private static final String FTL_SQUARE_BRACKET_TAG = "[#ftl]"; | ||
| private static final String MARK_POSITION = "position_"; | ||
| private static final String MARK_CODE = "code_"; |
| } | ||
| }); | ||
| model.entrySet( ).removeIf( e -> { | ||
| if ( e.getKey( ).contains( MARK_POSITION ) ) |
There was a problem hiding this comment.
GenericFormsProvider uses it as a prefix so we should use startsWith instead of contains ?
There was a problem hiding this comment.
Yes, that is indeed a prefix. I replaced it with a startWith
| private void replaceNullEntries( Map<String, Object> model, Locale currentLocale ) | ||
| { | ||
| model.forEach( ( key, value ) -> { | ||
| if ( key.contains( MARK_CODE ) ) |
There was a problem hiding this comment.
Same here, I replaced it with startsWith
|
comes with lutece-platform/lutece-form-plugin-forms#639 |
160a8b3 to
920eeb2
Compare


No description provided.