Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F form-processor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • form-processor
  • Merge requests
  • !37

Correctly record Boolean as FALSE when using API3 create

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged JonGold requested to merge JonGold/form-processor:working-false-boolean into master May 13, 2022
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

Currently, you can not record a FALSE value from a Boolean to the database.

Steps to Replicate

  • Create a "Yes/No" custom field on contacts.
  • Create a new form processor.
  • Create two inputs, contact_id (Integer) and yesno (Boolean).
  • Create an action "Update Contact Custom Data" which updates the new custom field on the specified with the value of yesno.
  • Save your form processor and test the form processor.

Expected Result

Boolean TRUE sets the custom field to "Yes". Boolean FALSE sets the custom field to "No".

Actual Result

Boolean TRUE sets the custom field to "Yes". Boolean FALSE results in no change to the field.

This is a quirk in API3, but it's not going away, so I fixed it by allowing the Boolean input type to return TRUE/FALSE or 1/0. We default to TRUE/FALSE for backward compatibility.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: working-false-boolean