Skip to content

Commit fc99279

Browse files
authored
Merge pull request #3805 from Imat00/ISSUE/2896
Issue/2896 owner_lifecycle_state
2 parents f55ffdd + c24d575 commit fc99279

File tree

22 files changed

+441
-9
lines changed

22 files changed

+441
-9
lines changed

documentation/revision-history-develop.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,7 @@ bugfix release:
297297

298298
# 8.9.1 - 02.10.2025 DEVELOP
299299
- owner-recertification
300+
301+
# 8.9.2 - 17.10.2025 DEVELOP
302+
- add ownerLifeCycleState
303+
- add manageable ownerLifeCycleState menu

inventory/group_vars/all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### general settings
2-
product_version: "8.9.1"
2+
product_version: "8.9.2"
33
ansible_user: "{{ lookup('env', 'USER') }}"
44
ansible_become_method: sudo
55
ansible_python_interpreter: /usr/bin/python3

roles/api/files/replace_metadata.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10485,6 +10485,12 @@
1048510485
}
1048610486
]
1048710487
},
10488+
{
10489+
"table": {
10490+
"name": "owner_lifecycle_state",
10491+
"schema": "public"
10492+
}
10493+
},
1048810494
{
1048910495
"table": {
1049010496
"name": "owner_network",
@@ -26177,4 +26183,4 @@
2617726183
]
2617826184
}
2617926185
}
26180-
}
26186+
}

roles/database/files/sql/creation/fworch-create-foreign-keys.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ ALTER TABLE request.ticket ADD CONSTRAINT request_ticket_current_handler_foreign
231231
ALTER TABLE request.ticket ADD CONSTRAINT request_ticket_recent_handler_foreign_key FOREIGN KEY (recent_handler) REFERENCES uiuser(uiuser_id) ON UPDATE RESTRICT ON DELETE CASCADE;
232232
--- owner ---
233233
ALTER TABLE owner ADD CONSTRAINT owner_tenant_foreign_key FOREIGN KEY (tenant_id) REFERENCES tenant(tenant_id) ON UPDATE RESTRICT ON DELETE CASCADE;
234+
ALTER TABLE owner ADD CONSTRAINT owner_owner_lifecycle_state_foreign_key FOREIGN KEY (owner_lifecycle_state_id) REFERENCES owner_lifecycle_state(id) ON DELETE SET NULL;
234235
--- comment ---
235236
ALTER TABLE request.comment ADD CONSTRAINT request_comment_uiuser_foreign_key FOREIGN KEY (creator_id) REFERENCES uiuser(uiuser_id) ON UPDATE RESTRICT ON DELETE CASCADE;
236237
ALTER TABLE request.comment ADD CONSTRAINT request_comment_request_comment_foreign_key FOREIGN KEY (ref_id) REFERENCES request.comment(id) ON UPDATE RESTRICT ON DELETE CASCADE;

roles/database/files/sql/creation/fworch-create-tables.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,7 @@ create table owner
10691069
last_recert_check Timestamp,
10701070
recert_check_params Varchar,
10711071
criticality Varchar,
1072+
owner_lifecycle_state_id int,
10721073
active boolean default true,
10731074
import_source Varchar,
10741075
common_service_possible boolean default false,
@@ -1079,6 +1080,11 @@ create table owner
10791080
recert_active boolean default false
10801081
);
10811082

1083+
CREATE TABLE owner_lifecycle_state (
1084+
id SERIAL PRIMARY KEY,
1085+
name Varchar NOT NULL
1086+
);
1087+
10821088
create table owner_network
10831089
(
10841090
id BIGSERIAL PRIMARY KEY,

roles/database/files/sql/idempotent/fworch-texts.sql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,8 @@ INSERT INTO txt VALUES ('write_user_pwd', 'German', 'Passwort Schreibende
20982098
INSERT INTO txt VALUES ('write_user_pwd', 'English', 'Write User Password');
20992099
INSERT INTO txt VALUES ('tenant', 'German', 'Mandant');
21002100
INSERT INTO txt VALUES ('tenant', 'English', 'Tenant');
2101+
INSERT INTO txt VALUES ('owner_lc_state', 'German', 'Produktionsstatus');
2102+
INSERT INTO txt VALUES ('owner_lc_state', 'English', 'Production state');
21012103
INSERT INTO txt VALUES ('global_tenant_name', 'German', 'Globaler Mandantenname');
21022104
INSERT INTO txt VALUES ('global_tenant_name', 'English', 'Global Tenant Name');
21032105
INSERT INTO txt VALUES ('pwMinLength', 'German', 'Mindestlänge');
@@ -2402,6 +2404,16 @@ INSERT INTO txt VALUES ('assign_state_to', 'German', 'Status zuordnen zu:
24022404
INSERT INTO txt VALUES ('assign_state_to', 'English', 'Assign state to: ');
24032405
INSERT INTO txt VALUES ('select_action', 'German', 'Aktion auswählen');
24042406
INSERT INTO txt VALUES ('select_action', 'English', 'Select action');
2407+
INSERT INTO txt VALUES ('manage_owner_lc_state','German', 'Produktions-Lifecylce-Status ändern');
2408+
INSERT INTO txt VALUES ('manage_owner_lc_state','English', 'Manage production lifecycle states');
2409+
INSERT INTO txt VALUES ('add_owner_lc_state', 'German', 'Lifecycle Status hinzufügen');
2410+
INSERT INTO txt VALUES ('add_owner_lc_state', 'English', 'Add Owner Lifecycle State');
2411+
INSERT INTO txt VALUES ('owner_lc_states', 'German', 'Produktions-Status');
2412+
INSERT INTO txt VALUES ('owner_lc_states', 'English', 'Production Lifecycle States');
2413+
INSERT INTO txt VALUES ('edit_owner_lc_state', 'German', 'Lifecycle Status bearbeiten');
2414+
INSERT INTO txt VALUES ('edit_owner_lc_state', 'English', 'Edit Owner Lifecycle State');
2415+
INSERT INTO txt VALUES ('delete_owner_lc_state','German', 'Lifecycle Status löschen');
2416+
INSERT INTO txt VALUES ('delete_owner_lc_state','English', 'Delete Owner Lifecycle State');
24052417
INSERT INTO txt VALUES ('owners', 'German', 'Eigentümer');
24062418
INSERT INTO txt VALUES ('owners', 'English', 'Owners');
24072419
INSERT INTO txt VALUES ('add_owner', 'German', 'Eigentümer hinzufügen');
@@ -2987,6 +2999,8 @@ INSERT INTO txt VALUES ('U5217', 'German', 'Sind sie sicher, dass sie folgenden
29872999
INSERT INTO txt VALUES ('U5217', 'English', 'Are you sure you want to delete owner: ');
29883000
INSERT INTO txt VALUES ('U5218', 'German', 'Löscht alle Beispiel-Eigentümer (auf "_demo" endend)');
29893001
INSERT INTO txt VALUES ('U5218', 'English', 'Deletes all sample owners (ending with "_demo")');
3002+
INSERT INTO txt VALUES ('U5219', 'German', 'Sind sie sicher, dass sie folgenden Lifecycle Status löschen wollen: ');
3003+
INSERT INTO txt VALUES ('U5219', 'English', 'Are you sure you want to delete Owner Lifecycle State: ');
29903004

29913005
INSERT INTO txt VALUES ('U5301', 'German', 'Einstellungen geändert.');
29923006
INSERT INTO txt VALUES ('U5301', 'English', 'Settings changed.');
@@ -3351,6 +3365,8 @@ INSERT INTO txt VALUES ('E5291', 'German', 'Eigentümer konnte nicht gespei
33513365
INSERT INTO txt VALUES ('E5291', 'English', 'Owner could not be saved');
33523366
INSERT INTO txt VALUES ('E5292', 'German', 'Dn oder Gruppe muss gefüllt sein');
33533367
INSERT INTO txt VALUES ('E5292', 'English', 'Dn or group has to be filled');
3368+
INSERT INTO txt VALUES ('E5293', 'German', 'Lifecycle Status konnte nicht gespeichert werden');
3369+
INSERT INTO txt VALUES ('E5293', 'English', 'Owner Lifecycle State could not be saved');
33543370

33553371
INSERT INTO txt VALUES ('E5301', 'German', 'Konfiguration konnte nicht gelesen oder verarbeitet werden.');
33563372
INSERT INTO txt VALUES ('E5301', 'English', 'Error reading or processing Config.');
@@ -5706,6 +5722,12 @@ INSERT INTO txt VALUES ('H5662', 'English', 'Body of decommission emails: Text o
57065722
');
57075723
INSERT INTO txt VALUES ('H5663', 'German', 'Alle Regeln modelliert erwarten: Alle dem Eigentümer zugeordneten Regeln müssen modelliert sein.');
57085724
INSERT INTO txt VALUES ('H5663', 'English', 'Expect all rules as modelled: All rules associated to the owner have to be modelled.');
5725+
INSERT INTO txt VALUES ('H5664', 'German', 'Produktionsstatus: Gibt an, in welchem Lifecycle Status sich der Eigentümer befindet.');
5726+
INSERT INTO txt VALUES ('H5664', 'English', 'Production state: The Owner Lifecycle State assigned to the owner.');
5727+
INSERT INTO txt VALUES ('H5665', 'German', 'Name: Name des Produktionsstatus');
5728+
INSERT INTO txt VALUES ('H5665', 'English', 'Name: Owner Lifecycle State name');
5729+
INSERT INTO txt VALUES ('H5666', 'German', 'In diesem Kapitel können die Produktions-Status von Eigentümern eingesehen, erstellt, bearbeitet und gelöscht werden. Produktions-Status definieren den aktuellen Zustand eines Eigentümers (z. B. Geplant, Im Betrieb, Auslaufend).');
5730+
INSERT INTO txt VALUES ('H5666', 'English', 'In this chapter, Production Lifecycle States of owners can be viewed, created, edited, and deleted. Production Lifecycle States define the current status of an owner (e.g., Planned, In Production, End of Life).');
57095731

57105732
INSERT INTO txt VALUES ('H5701', 'German', 'Die in der Datenbank hinterlegten sprachabhängigen Texte können individuell überschrieben werden.
57115733
Dabei werden die vom System vorgegebenen Texte nicht geändert, sondern nur durch die hier definierten Texte - falls vorhanden - überblendet.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CREATE TABLE if not exists owner_lifecycle_state (
2+
id SERIAL PRIMARY KEY,
3+
name Varchar NOT NULL
4+
);
5+
6+
alter table owner add column if not exists owner_lifecycle_state_id int;
7+
8+
alter table owner drop constraint if exists owner_owner_lifecycle_state_foreign_key;
9+
ALTER TABLE owner ADD CONSTRAINT owner_owner_lifecycle_state_foreign_key FOREIGN KEY (owner_lifecycle_state_id)REFERENCES owner_lifecycle_state(id) ON DELETE SET NULL;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mutation deleteLifeCycle($id: Int!) {
2+
delete_owner_lifecycle_state(where: {id: {_eq: $id}}) {
3+
affected_rows
4+
}
5+
}

roles/lib/files/FWO.Api.Client/APIcalls/owner/fragments/ownerDetails.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ fragment ownerDetails on owner {
1010
recert_check_params
1111
last_recert_check
1212
criticality
13+
owner_lifecycle_state_id
1314
active
1415
import_source
1516
common_service_possible
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query getOwnerLifeCycleStates {
2+
owner_lifecycle_state (order_by: { name: asc }){
3+
id
4+
name
5+
}
6+
}

0 commit comments

Comments
 (0)