This site is maintained for archival purposes only. Eclipse projects have transitioned to GitHub and Eclipse GitLab. Use the Projects search tool to locate your project and access its latest code and issue tracker.
Bug 229229 - Duplicate parameter added
Summary: Duplicate parameter added
Status: CLOSED WONTFIX
Alias: None
Product: Data Tools
Classification: Tools
Component: SQL Query Builder (show other bugs)
Version: 1.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.6.2   Edit
Assignee: Brian Payton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 229208
  Show dependency tree
 
Reported: 2008-04-29 02:58 EDT by Tianli Zhang CLA
Modified: 2008-11-14 13:18 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tianli Zhang CLA 2008-04-29 02:58:59 EDT
Description:
Duplicate parameter are added

Build number: 
2.3.0.v20080429-0946
1.6 v20080428-0500

Steps to reproduce:
1, New a datasource FROM "BIRT Classic Models Sample Database" Connection
profile
2, New a dataset based on the datasource
3, Add a table and input a condition to CUSTOMERNUMBER=:a
4, Modify the value to :A
5, Click Finish and check the parameters in Parameter page

Expected result:
Only one parameter in the page

Actual result:
There are two parameters: a and A.

Error log:
Comment 1 Linda Chan CLA 2008-04-29 19:27:50 EDT
This problem is actually with the SQB tool and its updates of the SQL Query model.
It should be reproducible directly in SQB (independent of BIRT's integrated version).  

The use case is specific to editing a parameter variable name, e.g. from ":a" to ":abc", in the Conditions tab (under the Value column).
The QueryStatement model is then updated with the correct SQL (i.e. getSQL() contains the correct condition clause with the revised parameter variable name.  But the call to StatementHelper.getAllVariablesInQueryStatement( queryStmt, false ) returns 2 parameter variables (i.e. both the old and new variables).

This problem does not exist when editing the parameter variable name directly in the Source pane.
Comment 2 Linda Chan CLA 2008-04-29 20:54:28 EDT
Extending the above use case, i.e. after changing the host variable name in Conditions tab, if one then executes the "Run SQL" action, the problem does not exist.
This is probably because the ExecuteAction triggers the SQLBuilder to reparse, which updates its QueryStatement.
It seems that any updates made to the SQL query text through the Conditions tab should have automatically triggered it to reparse as well.
Comment 3 Brian Fitzpatrick CLA 2008-10-24 13:11:08 EDT
Removing SQB: prefix on bug title at PMC request
Comment 4 Duncan Rigby CLA 2008-11-07 11:54:24 EST
I tried to reproduce this error, but could not:
DTP 1.6.1 20089019

Comment 5 Linda Chan CLA 2008-11-07 22:01:41 EST
I'd tried it with latest 1.6.2M1, and also not able to reproduce it anymore. I see that in the Conditions tab, it no longer allows one to edit an existing variable name directly in the cell.  Perhaps that change has avoided the previous issue.

Tianli, can you please try to see if it is still producible for your use case?
Comment 6 Tianli Zhang CLA 2008-11-09 20:08:38 EST
I have tried int the latest build and can not reproduce it. So it's good, the issue has been resolved. 
Comment 7 Brian Fitzpatrick CLA 2008-11-14 13:17:57 EST
This issue appears to have been resolved.
Comment 8 Brian Fitzpatrick CLA 2008-11-14 13:18:12 EST
Closing