#908: AuftragsStatus.kt

projectforge-business/src/main/kotlin/org/projectforge/business/fibu/AuftragsStatus.kt Type: Enum class
Package: org.projectforge.business.fibu
Path: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/AuftragsStatus.kt
Author: Kai Reinhard (k.reinhard@micromata.de) 79 lines · 36 code · 35 comments · 8 blank

Enumerates the lifecycle states of an Auftrag (order/project) in the financial accounting (Fibu) module. Each status maps to an aggregate AuftragsOrderState for reporting and filtering purposes. Implements I18nEnum for internationalized display labels.

Enum Values

ConstantKeyOrder StateMeaning
IN_ERSTELLUNGin_erstellungPOTENTIALOrder is being drafted
POTENZIALpotenzialPOTENTIALOnly potential / opportunity
GELEGTgelegtPOTENTIALQuotation submitted
LOIloiPOTENTIALLetter of Intent received
OPTIONALoptionalPOTENTIALOptional / uncertain
BEAUFTRAGTbeauftragtCOMMISSIONEDOrder is commissioned / active
ABGESCHLOSSENabgeschlossenCOMMISSIONEDOrder is completed
ESKALATIONeskalationCOMMISSIONEDEscalated (but still commissioned)
ABGELEHNTabgelehntLOSTOrder was rejected
ERSETZTersetztLOSTOrder replaced by a newer one

Design

i18n Integration

Each status has a key property used to construct the full i18n key as "fibu.auftrag.status.{key}".

Companion Object

safeValueOf(name) safely looks up an enum constant by name, returning null if not found instead of throwing.

Convenience Methods

Order State Aggregation

The computed orderState property maps statuses into three groups:

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
42dc9fa16 Orders: ordered -> commisioned.
3f25c773a Migration stuff in progress...
d02c8a770 Migration stuff in progress...
567ca70cd Migration in progress... spring.datasource.hikari.auto-commit=false
87dd5b87c AuftragsCache refactored, migration stuff... (all tests OK)