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

Created by/Last updated by not set updating Datetime when save-mode is "Insert if not exists[, or update]" #4091

Open
jakob1379 opened this issue Apr 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jakob1379
Copy link

Describe the bug

The reference automatic references from "created by" "updated by" are not set when the field to be updated is a Datetime field. It works with other types.

Version

v0.21.0-alpha.10

How To Reproduce

  1. Create an empty model and manually create the "Created by" and "Created at" fields, make sure they are not registered as system fields.
  2. Create a submission form with "Insert if exists, or update" save-mode enabled and set the dependent fields on "created by" and "created at"
  3. Create an entry

Expected behavior

"Created by" should be set and work as expected, even if it is not a system field

Screenshots

image

Desktop (please complete the following information)

~                                                                                         
❯ neofetch 
          ▗▄▄▄       ▗▄▄▄▄    ▄▄▄▖            jga@nixos 
          ▜███▙       ▜███▙  ▟███▛            --------- 
           ▜███▙       ▜███▙▟███▛             OS: NixOS 24.05.20240316.c75037b (Uakari) x86_64
            ▜███▙       ▜██████▛              Host: LENOVO 20NYSD4R05 
     ▟█████████████████▙ ▜████▛     ▟▙        Kernel: 6.6.22 
    ▟███████████████████▙ ▜███▙    ▟██▙       Uptime: 39 mins 
           ▄▄▄▄▖           ▜███▙  ▟███▛       Packages: 1159 (nix-system), 6275 (nix-user) 
          ▟███▛             ▜██▛ ▟███▛        Shell: bash 5.2.26 
         ▟███▛               ▜▛ ▟███▛         Resolution: 3440x1440 
▟███████████▛                  ▟██████████▙   DE: Plasma 5.27.10 
▜██████████▛                  ▟███████████▛   WM: KWin 
      ▟███▛ ▟▙               ▟███▛            Icons: breeze [GTK2/3] 
     ▟███▛ ▟██▙             ▟███▛             Terminal: .konsole-wrappe 
    ▟███▛  ▜███▙           ▝▀▀▀▀              CPU: Intel i7-8665U (8) @ 4.800GHz 
    ▜██▛    ▜███▙ ▜██████████████████▛        GPU: Intel WhiskeyLake-U GT2 [UHD Graphics 620] 
     ▜▛     ▟████▙ ▜████████████████▛         Memory: 8806MiB / 15662MiB 
           ▟██████▙       ▜███▙
          ▟███▛▜███▙       ▜███▙                                      
         ▟███▛  ▜███▙       ▜███▙                                     
         ▝▀▀▀    ▀▀▀▀▘       ▀▀▀▘

~                                                                                         
❯ firefox --version
Mozilla Firefox 124.0.2
@hongboji
Copy link
Contributor

hongboji commented Apr 18, 2024

The "Created by" and "Created at" fields are automatically processed by the system, it is not recommended to use the save mode in this way, it can be used in the appropriate places, for example, when the name is duplicated, the data will be updated.

@jakob1379
Copy link
Author

One thing is that it is not recommended, what I would love to know is why it seems to mainly be an issue if I have another "Datetime" field that is updated.

@hongboji hongboji added the bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants