From: Krzysztof B. <kb...@un...> - 2017-05-12 06:22:23
|
Sander, W dniu 11.05.2017 o 11:15, Sander Apweiler pisze: > Hi Krzysztof, > > we want to change the type of our email attribute from string into > verifiableEmail. We created a new attribute and want to copy the values > from the old one to the new one. Because of vacations, business travels > and other possible reasons, we do not prefer a copy with rest api. > > We want to do the mapping with an enquiry form. But in our test the > enquiry form did not create a new attribute. The enquiry form has two > automatically assigned settings. > 1. Auto acceptance of the form > 2. Add Attribute mail with expression: attr['email'] (condition: true) > > I guess the new attribute is not created because attr['email'] is not > present. The same setting in registration from works. But in > registration form the user enters the attribute 'email'. > > Is there a way to use existing user attributes in enquiry forms? Yes, you are guessing correctly: attr is not holding existing user attributes, rather those requested. We wold need to add existing attributes to the enquiry MVEL context for this purpose what sounds as anyway good idea. Though I think rather in Unity 2 branch where this will be easier. That said, I don't think that enquiry form is the best choice for this use case. For automation of user-related tasks we have the bulk entity operations feature. So what this call for is an action set attribute - what is bit of work but shouldn't be too difficult. In context of Unity 2 we should add even more powerful feature that will be ultimate solution (even if bit harder to use): groovy entity processor. Then we will have an opportunity to do just everything. So if you want we can open a ticket for addAttribute bulk action. Anyway I'll open 2 tickets for U2: groovy bulk action and adding existing attributes to enquiry automation context. Best Krzysztof |