fusiondirectory issueshttps://gitlab.fusiondirectory.org/fusiondirectory/fd/-/issues2021-08-25T14:47:37Zhttps://gitlab.fusiondirectory.org/fusiondirectory/fd/-/issues/5906template enhancement for multivalued field2021-08-25T14:47:37Zbmortiertemplate enhancement for multivalued field### Requirements
an FD 1.3 fully functional
## Descriptive title for this enhancement
apply template with some specific action on multi valued field
### Actual behavior
if a value is set in multi valued field in template, all values...### Requirements
an FD 1.3 fully functional
## Descriptive title for this enhancement
apply template with some specific action on multi valued field
### Actual behavior
if a value is set in multi valued field in template, all values are replace in destination template when template is apply.
There is non incremental way ( adding value instead of replace)
### Expected behavior
on template in multi valued field such supannRefId I set a place holder like `+[{MYMAIL}%sn%.%givenName%@company.fr]`
If I apply the template, a new value is ADDED in the field supannRefId : `{MYMAIL}doe.jon@company.fr`
In the same way, we could imagine to remove a specific value like `-[{MYMAIL}%sn%.%givenName%@company.fr]`
it remove the value `{MYMAIL}doe.jon@company.fr`
If `-[{MYMAIL}*` is set all value beginning by `{MYMAIL}*` is removed
### Step by step description of new behavior
1. create template with `+[{MYMAIL}%sn%.%givenName%@company.fr]` in supannRefId multi valued field
2. the user john doe have inside the supanRefId field the following value
```
supannRefId: {STUDENT}04564@university.com
supannRefId: {PHONEID}34563456@ring.id
```
3. The template is applied, we get the following field :
```
supannRefId: {STUDENT}04564@university.com
supannRefId: {PHONEID}34563456@ring.id
supannRefId: {MYMAIL}doe.jon@company.fr
```
and not only :
supannRefId : {MYMAIL}doe.jon@company.fr
### Benefits
more capabilities for automated user creation
### Possible Drawbacks
complexity of the codebmortierbmortierhttps://gitlab.fusiondirectory.org/fusiondirectory/fd/-/issues/6076Fatal error when applying template with no asked fields2020-12-02T14:17:53ZbmortierFatal error when applying template with no asked fields### Description
```
Fatal error: Uncaught TypeError: Argument 2 passed to simplePlugin::adapt_from_template() must be of the type array, null given, called in /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc on line 4...### Description
```
Fatal error: Uncaught TypeError: Argument 2 passed to simplePlugin::adapt_from_template() must be of the type array, null given, called in /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc on line 465 and defined in /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc:1923
Stack trace:
#0 /usr/share/fusiondirectory/include/simpleplugin/class_simpleTabs.inc(465): simplePlugin->adapt_from_template(Array, NULL)
#1 /usr/share/fusiondirectory/include/class_template.inc(355): simpleTabs->adapt_from_template(Array, NULL)
#2 /usr/share/fusiondirectory/include/management/class_templateDialog.inc(115): template->apply()
#3 /usr/share/fusiondirectory/include/management/class_templateDialog.inc(62): templateDialog->handle_finish()
#4 /usr/share/fusiondirectory/include/management/class_management.inc(459): templateDialog->save_object()
#5 /usr/share/fusiondirectory/include/management/class_management.inc(1274): management->execute()
#6 /usr/share/fusiondirectory/include/class_pluglist.inc(576): man in /usr/share/fusiondirectory/include/simpleplugin/class_simplePlugin.inc on line 1923
```
occurs when I try to create a SupAnn structure by using a template.
### Distribution Name and Version
Debian buster
### FusionDirectory Version
```
root@annuaire:~# apt-cache policy fusiondirectory-plugin-supann
fusiondirectory-plugin-supann:
Installé : 1.4-2~jenkinsbuild602
Candidat : 1.4-2~jenkinsbuild602
Table de version :
*** 1.4-2~jenkinsbuild602 500
500 https://integration.fusiondirectory.org/repos/development/debian/fusiondirectory-dev-14-stretch stretch/main amd64 Packages
100 /var/lib/dpkg/status
1.2.3-4+deb10u1 500
500 http://deb.debian.org/debian buster/main amd64 Packages
root@annuaire:~#
```
### Plugin with the defect
supann
### PHP version used
```
php:
Installé : 2:7.3+69
Candidat : 2:7.3+69
Table de version :
*** 2:7.3+69 500
500 http://deb.debian.org/debian buster/main amd64 Packages
100 /var/lib/dpkg/status
```
### Origin of php packages
from debian
### Steps to Reproduce
1. create a SupAnn template with %r|% in all mandatory fields
2. create a structure using this template
extract of template used
```
cn=TPL_SUPANN,ou=templates,ou=structures
objectClass: fdTemplate
fdTemplateField: facsimileTelephoneNumber:+%r[1,2,d]|% %r[1,1,d]|% %r[2,2,d]|% %r[2,2,d]|% %r[2,2,d]|% %r[2,2,d]|%
fdTemplateField: objectClass:organizationalUnit
fdTemplateField: objectClass:supannEntite
fdTemplateField: ou:CENTRE_%r[3,3,d]|%
fdTemplateField: postalAddress:%r[1,2,d]|% rue de %r[10,20,l]|%
fdTemplateField: supannCodeEntite:CTR_%r[3,3,d]|%
fdTemplateField: supannTypeEntite:{SUPANN}S238
fdTemplateField: telephoneNumber:+%r[1,2,d]|% %r[1,1,d]|% %r[2,2,d]|% %r[2,2,d]|% %r[2,2,d]|% %r[2,2,d]|%
cn: TPL_SUPANN
```
**Expected behavior:**
a new supann structure is create base on template
**Actual behavior:**
Error !
**Reproduces how often:**
100%FusionDirectory 1.4bmortierbmortierhttps://gitlab.fusiondirectory.org/fusiondirectory/fd/-/issues/5865Auto Fill SupannType for supann Composite Attribute2020-10-14T07:25:35ZbmortierAuto Fill SupannType for supann Composite Attribute### Requirements
Supann Plugin installed
## Descriptive title for this enhancement
When adding information in fdSupannRelationEntite ( supann extension) or supannRoleEntite( user's supann tab) the type and supannCodeEntite of one enti...### Requirements
Supann Plugin installed
## Descriptive title for this enhancement
When adding information in fdSupannRelationEntite ( supann extension) or supannRoleEntite( user's supann tab) the type and supannCodeEntite of one entity is mandatory
### Actual behavior
Type and label has been set manually and separatly. In my mind supannCodeEntite and type MUST be coherent and corresponding of the type stored in the structure selected
Have to confirm with the Supann guide.
### Expected behavior
Type of structure on "role" in user screen and "Relation" in Supann-ext tab should be set up automatically by choosing the structure)
### Step by step description of new behaviour
supann structure contain an entity with
* supannCodeEntite = COMPANY
* supannTypeEntite = {ACME}C001
Ex for user supann Role
1. choose a role ( ex RESP of supann referential)
2. choose the entity COMPANY
3. save
The supannRoleEntity field should contains : [role={SUPANN}RESP][type={ACME}C001][code=COMPANY]
### Benefits
Supann information more coherent on user screen and supann-ext
### Possible Drawbacks
no drawbacks in my mindFusionDirectory 1.4bmortierbmortierhttps://gitlab.fusiondirectory.org/fusiondirectory/fd/-/issues/6092Deprecated fallback was used for supannStructureExt::is_this_account2020-05-06T07:30:12ZbmortierDeprecated fallback was used for supannStructureExt::is_this_accountThis PHP error pops up whenever supann-ext plugin is installed.This PHP error pops up whenever supann-ext plugin is installed.FusionDirectory 1.4bmortierbmortier