Bug 175497 - rename parameter does not update its usage
Summary: rename parameter does not update its usage
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Wenfeng Li CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2007-02-26 04:15 EST by Leos Literak CLA
Modified: 2009-05-28 16:39 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leos Literak CLA 2007-02-26 04:15:32 EST
I have parameter source that is used in dataset (bound to dataset parameter) and in scripts. I click on this parameter, select Rename from popup menu and set it to resource. When I run the report, exception occurs. So I look to dataset and the source is still used. The same old value is in scripts.

Expected behaviour: when I use BIRT function to rename some item, this item must be searched in the report and renamed to new value.
Comment 1 Rick Lu CLA 2007-03-05 02:15:50 EST
Data set parameter has weak linkage with report parameter. So, the rename of report parameter will not update references in the report design. 

Reasons are:
1. scripts are evaluated in runtime, not design time. So it is very difficult to rename parameter names when uses the UI editor. If doing so, the performance will be a problem.
2. the user can implements the rename feature by doing so: a) copy/paste the report parameter "param1" to "param2", b) changes values in param2. c) delete the "param1" and rename "param2" to "param1". Thus, the user can use the new "parma1".

Will not support this feature in current stage.
Comment 2 Leos Literak CLA 2007-03-05 02:58:06 EST
I think that this is important feature and if you consider BIRT to be enterprise product, you must not throw away such bugs.

proposed solution (fast to implement, but not optimal):
1) user selects Rename parameter feature
2) rptdesigned is serialized to XML string
3) regular expression will be used to replace params["name1"] to params["name2"]
4) designer will load the XML

The parameters are not used only in dataset, but in scripts too (rptdesign - initialize), in conditions whether render some UI element (e.g. hide some table or label), in hyperlinks .. Basicly wherever expression can be defined, the params("name") can be used. It is absolutely stupid to demand the user to locate all occurences and fix it by hand.

If you don't wish to fix it now, then mark the bug as Later. But this is bug that must be fixed, unless you say that BIRT is a toy project and it is not expected to be seriously used.
Comment 3 Leos Literak CLA 2007-03-13 03:31:00 EDT
FYI: rename data source updates its references in data sets
Comment 4 Wenfeng Li CLA 2009-05-28 16:39:09 EDT
Add plan keyword to consider this enhancement as part of the refactoring feature.  Similar enhancement is also needed for many weak references in BIRT.