Red Hat Bugzilla – Bug 996099
'Add all remaining data holder fields' button not working
Last modified: 2014-08-06 16:12:12 EDT
Created attachment 785662 [details]
Video of reproducing steps
Description of problem:
When you click the 'Add all remaining data holder fields' in 'Add fields by origin' section of Form modeler no field is added to the form.
Version-Release number of selected component (if applicable):
BPMS 6.0.0.CR1 deployed on EAP 6.1
Steps to Reproduce:
See video attachment for reproducing steps. Textual description of steps for your reference:
1. First open some project with existing Data Model items (POJO class created by Data modeller) - for example repo: uf-playground, project: mortgates
2. Create new form using New Item > New form
3. In form data origin select 'from data model' > Applicant, fill in some Id and output id > click Add data holder
4. Go to Add fields by origin
5. Click the ">" titled 'Add all remaining data holder fileds' for our data origin class
no field is added. Although it is possible to add fields one by one, adding all at once is not working. There's no exception in server.log.
All fields from data holder should be added to form canvas.
Removed check that was disabling field addition from an existing DataHolder.
I just checked with BPMS 6.0.0.ER1 build and it still doesn't work correctly. The problem is that in the cases, when user has already added some (but not all) fields from the Data holder and then uses 'Add all remaining data holder fields', the form modeler adds ALL fields from that data holder.
I attach video to show you the current behavior:
1. Add a DataModel class with 5 fields as data origin.
2. Go to add fields by origin and add 2 individual fields from the class
3. Then click 'Add all remaining data holder fields' - then all the fields (even those that we already added) are added to the canvas, instead of just remaining fields. So you now have 7 fields added to the canvas, instead of the expected 5.
Created attachment 787903 [details]
Add all remaining dataholder fields - incorrect behavior
This bug was introduced by error when we changed how form-modeler determine if a DataHolder field is already used on a form. Now is checking if any form field contains any of the binding strings of a DataHolder field before adding it to the form.
Verified with BPMS 6.0.0 ER3