The "Date-controlled Infofields" plugin allows to have special node referencing information fields with date-controlled values. In other words values can be added with a timespan in which they are valid for the asset. E.g. if the copyright changes at day X, we can add a node corresponding to the copyright to the date-controlled information field which is valid until one day before day X and the new node with validity form day X onwards. Using the CELUM toolkit and permission defining nodes permissions can also be set. This can be configured on any day (instead of doing the changes manually on day X).
To be configured in {home}/appserver/conf/custom.properties
type: string, required: yes, default: -
The license key for the plugin (product: dateControlledInfoFields), provided by brix.
type: string, required: no, default:
0 0 1 * * ?
(every day at 1:00, because a lot of system tasks are running at 0:00)
The cron expression for the update task which updats all date-controlled information fields with the correct values for the current date.
type: comma-separated user group ids, required: no, default: - (all users)
The user groups which are allowed to use the GUI with view permission to see when and which value is valid for an asset.
type: comma-separated user group ids, required: no, default: - (super admins only)
The user groups which are allowed to edit date-controlled information fields.
type: comma-separated node referencing information field ids, required: yes, default: -
The node referencing information fields which are date-controlled information fields. Those fields should (and can if the permissions are set up correctly) be modified via the GUI for date-controlled information fields. It can be reached via the context menu.
type: {ofDateControlledInfoField},{startOffsetInDays},{endOffsetInDays}, required: no, default: -, since: v1.3
Offset fields for date controlled information fields. Those fields have the same date-controlled values as
the field they depend on, but the start and end can have an offset. E.g. to have the date controlled values of field 123
one week earlier in field 124 we write dateControlledInfoFields.offsetField.124=123,-7,0
. Positive offset will only work
on the start date and not on the end date, because as soon as a node is removed from the date controlled field it is
removed from all its offset fields also.
Create the following table in your CELUM database:
-- MySQL
create table brix_date_controlled_info_fields (
asset_id bigint,
info_field_id int,
node_id bigint,
from_date date,
to_date date,
primary key (asset_id, info_field_id, node_id),
foreign key (asset_id) references ims_asset(ims_id) on delete cascade,
-- index missing unfortunately
-- foreign key (info_field_id) references ims_infofield(ims_infofield_id) on delete cascade,
foreign key (node_id) references ims_container(ims_id) on delete cascade
);
-- SQL Server
create table brix_date_controlled_info_fields (
asset_id numeric(38, 0),
info_field_id numeric(38, 0),
node_id numeric(38, 0),
from_date date,
to_date date,
primary key (asset_id, info_field_id, node_id),
foreign key (asset_id) references ims_asset(ims_id) on delete cascade,
foreign key (info_field_id) references ims_infofield(ims_infofield_id) on delete cascade,
foreign key (node_id) references ims_container(ims_id) on delete cascade
);
Optionally migrate the existing values:
INSERT INTO brix_date_controlled_info_fields (asset_id, info_field_id, node_id)
SELECT ims_entityid, ims_fieldid, ims_referencedid
FROM ims_asset_node_backed_field
WHERE ims_fieldid in (111, 112) -- date-controlled information fields
-- offset fields 222 depends on 111 with offset -20 (start) and -10 (end)
INSERT INTO brix_date_controlled_info_fields (asset_id, info_field_id, node_id, from_date, to_date)
SELECT asset_id, 222, node_id, DATEADD(day, -20, from_date), DATEADD(day, -10, to_date)
FROM brix_date_controlled_info_fields
WHERE info_field_id = 111
Add the configuration properties explained above to your custom.properties file. Be aware that all the already existing values will be cleared for any node referencing field specified unless it was migrated (step 2.), because the content of those fields is now controlled by the plugin.
Add the extension to the appserver/lib directory and restart the appserver.
The update task for the date-controlled information fields can be found in the system tasks in CELUM. If for some reason the server wasn't running when the update should have taken place (usually every night at 01:00) and the values should be updated on the current day, then run this task to trigger the update manually. There is no need to run this task more than once per day, changes to assets via the GUI are updated immediately.
The GUI can be opened via the asset or the node context menu. All the selected assets and all the assets directly linked to the selected nodes will be available in the GUI. Assets without asset type or if the asset's asset type has no date-controlled information field it will be filtered and is not available in the GUI.
-
means there is none. ~
indicates that the value is not unique among the selected assets.
c. The to date for the value. -
means there is none. ~
indicates that the value is not unique among the selected assets.Date-controlled Infofields | CELUM (min. version) |
---|---|
1.0 | 6.4+ (tested with 6.8) |
1.1 | 6.4+ (tested with 6.8) |
Nova Plugin | CELUM (min. version) | Backend Plugin (min. version) |
---|---|---|
1.0.0 | 6.10.0 | 1.1 |
1.0.1 | 6.11.0 | 1.1 |
Released 2021-10-14
Initial Version
Released 2021-11-22
Nova Backend added
Preview fields