Date-controlled Infofields

Advanced-UI NOVA-UI DB-Table

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).

Properties

To be configured in {home}/appserver/conf/custom.properties

dateControlledInfoFields.license

type: string, required: yes, default: -

The license key for the plugin (product: dateControlledInfoFields), provided by brix.

dateControlledInfoFields.cronExpression

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.

dateControlledInfoFields.view

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.

dateControlledInfoFields.edit

type: comma-separated user group ids, required: no, default: - (super admins only)

The user groups which are allowed to edit date-controlled information fields.

dateControlledInfoFields.infoFields

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.

dateControlledInfoFields.offsetField.{id}

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.

Installation

  1. 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
    );
  2. 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
  3. 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.

  4. Add the extension to the appserver/lib directory and restart the appserver.

Configuration

  • It is highly recommended to make all date-controlled information fields read-only, so they can only be edited via the GUI.
  • The license and infoFields are required.
  • In most cases edit should be configured too, otherwise only super-admins can modify date-controlled information fields.

Usage

Update Task

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.

Context Menu

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.

GUI

Date-controlled Infofields GUI

  1. The panel with the selected assets.
  2. The control panel.
  3. The panel with the values found in the selected date-controlled information field in the selected assets.
  4. Separators between the panels, they can be adjusted freely.
  5. The assets. a. The thumbnail for the asset. b. The title of the asset with the id in parentheses. Hover with the mouse to see the entire name if it is too long to be displayed. c. The checkbox to indicate whether the asset is selected or not.
  6. Select for the date-controlled information field. As soon as one was selected, its values are shown. If there would be more than 200 date-controlled information fields then only the first 200 are displayed in the list, and the rest is only shown when using type ahead.
  7. Select for the value which should be modified. See 6. for the constraints. Viewers don't have this element.
  8. The date at which the value should be added to the selected field. If left empty there is no constraint, and the value is added immediately. Viewers don't have this element.
  9. The last date at which the selected value should be in the selected field. So the value will be removed the next day. Viewers don't have this element.
  10. Add or update (with the new dates) this value for all selected assets which have the selected date-controlled information field. How many were successfully modified, ignored or failed can be seen in the summary shown after completing the job. Viewers don't have this element.
  11. Remove the selected value from all assets which have the selected date-controlled information field. Viewers don't have this element.
  12. The values which can be found in the selected assets for the selected date-controlled information field. The color goes from black to green. The brighter the green the more assets have the value, i.e. 1% would be almost completely black and 100% would be a bright green. a. The value name, and the number of occurrences in parentheses. b. The from date for the value. - 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.
  13. Select all assets.
  14. Select no asset.

Compatibility Matrix

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

Release Notes

1.0.0

Released 2021-10-14

Initial Version

1.1.0

Released 2021-11-22

Nova Backend added

1.3.0

Preview fields