You are not logged in.
Pages: 1
I'm struggling a bit with creating a rule to automatically assign an Entity to PCs based upon their TAG.
I have created Entities with the same name as the TAG field from OCS, and I've created a rule as follows:
Criteria Section:
Criteria Condition Reason
OCS TAG Regex checks /([a-z\ A-Z]+)/
Actions section:
Fields Action type Value
Entity from TAG Assign value from regex #0
In debug mode, I can see that "#0" holds the name of the tag field, which matches an entity, but when testing the rule the entity assigned is blank.
The entities have been created under a parent entity - does this make a difference? Do I need to assign the Entity as something like "Parent Entity > #0" ?
Any help greatly appreciated :-)
Thanks!
Offline
> I have created Entities with the same name as the TAG field from OCS, and I've created a rule as follows:
The TAG is not the name of the entity.
The TAG must be filled in the "Entity TAG" field
+
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
Ah, got it - thank you!
For anybody else who wants to know how this works, if you go to:
Admin -> Entites and select an Entity, you will see there is a field called "Entity TAG"
I have populated this with the name of my OCS TAG for each corresponding Entity.
The regex match in the rule detailed in the initial post takes the value of the OCS TAG field.
The actions part of the rule then looks for this value (#0) in the "Entity TAG" field of your entities, and if it finds a match then that entity is assigned.
The use of the TAG field confused me as I had not seen the "Entity TAG" field and thought it was still referring to the OCS TAG.
Thanks for the help!
Offline
Pages: 1