Bug 996099

Summary: 'Add all remaining data holder fields' button not working
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: Form ModelerAssignee: Pere Fernàndez <pere.fernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: pzapataf
Target Milestone: ER3   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:12:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Video of reproducing steps
none
Add all remaining dataholder fields - incorrect behavior none

Description Jan Hrcek 2013-08-12 12:08:25 UTC
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

How reproducible:
Always

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

Actual results:
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.

Expected results:
All fields from data holder should be  added to form canvas.

Comment 1 Pere Fernàndez 2013-08-14 16:21:18 UTC
Removed check that was disabling field addition from an existing DataHolder.

Commits:
https://github.com/droolsjbpm/jbpm-form-modeler/commit/75c2ffb90abbcb4a20e9312e29a3785722030ad7

Comment 2 Jan Hrcek 2013-08-19 06:00:39 UTC
Hello Pere.
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.

Comment 3 Jan Hrcek 2013-08-19 06:01:23 UTC
Created attachment 787903 [details]
Add all remaining dataholder fields - incorrect behavior

Comment 4 Pere Fernàndez 2013-08-28 10:25:01 UTC
Hello Jan,

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.

Commits:
https://github.com/droolsjbpm/jbpm-form-modeler/commit/cb8282bee69d5111624abdbf3373b92efa1dd068

Comment 5 Jan Hrcek 2013-09-23 07:39:22 UTC
Verified with BPMS 6.0.0 ER3