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

Cannot set empty value to the field #928

Closed
ghost opened this issue May 22, 2023 · 2 comments
Closed

Cannot set empty value to the field #928

ghost opened this issue May 22, 2023 · 2 comments
Assignees
Labels
bug Something isn't working element templates

Comments

@ghost
Copy link

ghost commented May 22, 2023

Describe the Bug

The modelerer doesn't set an empty value to the field after being set.

Steps to Reproduce

The 1st case

The first case with all constraints on the field: notEmpty: false, pattern for numbers and maxLength. As You can see the value isn't set as empty

Steps to reproduce

  1. Load element-templateV1.txt
  2. In authentication section choose type Bearer Token and enter some value (Doesn't matter what it'll be as it's only for not empty constraint)
  3. Select operation Create Worksheet
  4. In operation details block enter some spreadsheet ID and worksheet name (Doesn't matter what it'll be as it's only for not empty constraint)
  5. Set in worksheet index some value and deploy.
  6. Set in worksheet index empty value and deploy.

The 2st case

The second case with constraints on the field: notEmpty: false, pattern for numbers and. As You can see I cannot set empty index despite pattern is ^([0-9]*$)

Steps to reproduce

  1. Load element-templateV2.txt
  2. In authentication section choose type Bearer Token and enter some value (Doesn't matter what it'll be as it's only for not empty constraint)
  3. Select operation Create Worksheet
  4. In operation details block enter some spreadsheet ID and worksheet name (Doesn't matter what it'll be as it's only for not empty constraint)
  5. Set in worksheet index some value and deploy.
  6. Set in worksheet index empty value and deploy.

The 3st case

The third case with only one constraint: notEmpty: false. As You can see in this case I'm able to set empty value.

Steps to reproduce

  1. Load element-templateV3.txt
  2. In authentication section choose type Bearer Token and enter some value (Doesn't matter what it'll be as it's only for not empty constraint)
  3. Select operation Create Worksheet
  4. In operation details block enter some spreadsheet ID and worksheet name (Doesn't matter what it'll be as it's only for not empty constraint)
  5. Set in worksheet index some value and deploy.
  6. Set in worksheet index empty value and deploy.

Expected Behavior

In all cases I'm able to set an empty value

Environment

  • Both web and desktop modelerers
  • OS: MacOs Ventura 13.3.1 (a)
  • Library version: [e.g. 2.0.0]
@ghost ghost added the bug Something isn't working label May 22, 2023
@marstamm
Copy link
Contributor

marstamm commented Jun 7, 2023

Hi @mrebrii , thank you for opening this issue. The way element templates currently work. invalid entries are not committed to the diagram. So when you safe or switch elements, the last valid value is kept.

I agree that this is unexpected behavior and invalid values might be wanted (e.g. empty values). I will move this item to the backlog.
This behavior is expected to change with the implementation of camunda/camunda-modeler#3357

@marstamm
Copy link
Contributor

closed via #938

@bpmn-io-tasks bpmn-io-tasks bot removed the backlog Queued in backlog label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working element templates
Projects
None yet
Development

No branches or pull requests

2 participants