[BUG] New age feature can set birth date in future #1254

Closed
opened 2026-02-05 01:01:51 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @NickIAm on GitHub (Aug 19, 2023).

The bug

The new feature that displays a person's age next to their face will allow you to set a birthday in the future. This results in an age with a negative value being displayed. It's not a huge deal, but it may be worth adding a simple check of the input and checking if it is in the future or not.

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.74

Version of Immich Mobile App

v1.74

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

root@immich:~/immich# cat docker-compose.yml 


  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
    logging:
      driver: none
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

DB_HOSTNAME=immich_postgres
DB_USERNAME=immich
DB_PASSWORD=<redacted>
DB_DATABASE_NAME=immich
UPLOAD_LOCATION=/media/immich/
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Reproduction steps

1. Open up any person on the explore page
2. Open the 3 dots menu and select set date of birth
3. choose a date in the future
4. Observe the age displayed in the info panel, it will be a negative value
...

Additional information

No response

Originally created by @NickIAm on GitHub (Aug 19, 2023). ### The bug The new feature that displays a person's age next to their face will allow you to set a birthday in the future. This results in an age with a negative value being displayed. It's not a huge deal, but it may be worth adding a simple check of the input and checking if it is in the future or not. ### The OS that Immich Server is running on Debian 12 ### Version of Immich Server v1.74 ### Version of Immich Mobile App v1.74 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML root@immich:~/immich# cat docker-compose.yml immich-web: container_name: immich_web image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} env_file: - .env restart: always typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd environment: - TYPESENSE_API_KEY=${TYPESENSE_API_KEY} - TYPESENSE_DATA_DIR=/data logging: driver: none volumes: - tsdata:/data restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} environment: # Make sure these values get passed through from the env file - IMMICH_SERVER_URL - IMMICH_WEB_URL ports: - 2283:8080 depends_on: - immich-server - immich-web restart: always volumes: pgdata: model-cache: tsdata: ``` ### Your .env content ```Shell DB_HOSTNAME=immich_postgres DB_USERNAME=immich DB_PASSWORD=<redacted> DB_DATABASE_NAME=immich UPLOAD_LOCATION=/media/immich/ IMMICH_WEB_URL=http://immich-web:3000 IMMICH_SERVER_URL=http://immich-server:3001 IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 ``` ### Reproduction steps ```bash 1. Open up any person on the explore page 2. Open the 3 dots menu and select set date of birth 3. choose a date in the future 4. Observe the age displayed in the info panel, it will be a negative value ... ``` ### Additional information _No response_
Author
Owner

@daniele-athome commented on GitHub (Aug 21, 2023):

I don't know if I would classify this as a bug. But I agree it could be considered "weird behavior".

@daniele-athome commented on GitHub (Aug 21, 2023): I don't know if I would classify this as a bug. But I agree it could be considered "weird behavior".
Author
Owner

@bo0tzz commented on GitHub (Aug 21, 2023):

@alextran1502 thoughts? Is this something we want to prevent?

@bo0tzz commented on GitHub (Aug 21, 2023): @alextran1502 thoughts? Is this something we want to prevent?
Author
Owner

@jrasm91 commented on GitHub (Aug 21, 2023):

I feel like it doesn't really matter a whole lot. Setting a date in the future doesn't really make sense, but also I don't see any real reason to enforce it.

@jrasm91 commented on GitHub (Aug 21, 2023): I feel like it doesn't really matter a whole lot. Setting a date in the future doesn't really make sense, but also I don't see any real reason to enforce it.
Author
Owner

@NickIAm commented on GitHub (Aug 25, 2023):

All fair points. It doesn't break anything and isn't really a big deal. Just seemed like a small thing to polish the UX a little.

@NickIAm commented on GitHub (Aug 25, 2023): All fair points. It doesn't break anything and isn't really a big deal. Just seemed like a small thing to polish the UX a little.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1254