Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004615Clover Designer(No Category)public2010-07-23 11:562010-08-18 15:29
Reportertwaller 
Assigned Tomzatopek 
PriorityurgentSeverityblockReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Versionrel-3-0-0Fixed in Versionrel-3-0-0 
Summary0004615: TE: If there are same metadata assigned to input port and at least two output ports, mapping gets disinterpreted
DescriptionPrecondition for this bug (added by:jlehotsky):
---
There must be metadata on the input edge and same metadata on two output edges for this to occur (return 0 described lower is a separate independent problem)
---
I have written the following code in Reformat:

//#CTL2

// Transforms input record into output record.
function integer transform() {
    $0.Customer = $0.Customer;
    $0.GroupNo = $0.GroupNo;

    return OK;
}

Reformat has two output edges with identical metadata.

After reopening the code, it looks like this:

//#CTL2

// Transforms input record into output record.
function integer transform() {
    $1.Customer = $0.Customer;
    $1.GroupNo = $0.GroupNo;

    return 0;
}

all records are sent to the port 0. They all are empty.
TagsNo tags attached.
OTRS_Ticket_ID
Time estimate (manhours)
Time duration (manhours)
Completion status10
Attached Files? file icon OK.grf [^] (3,836 bytes) 2010-07-23 11:57
png file icon CropperCapture[84].png [^] (49,463 bytes) 2010-07-29 16:31


png file icon CropperCapture[86].png [^] (47,589 bytes) 2010-07-29 16:32

- Relationships
related to 0004833closedmzatopek CTL2: Changes in code after reopening 
related to 0004834resolvedmzatopek CTL2: Missing return statement (but it is there!) 

-  Notes
(0008681)
twaller (manager)
2010-07-28 17:38

Source tab displays correct code before reopening Transform editor.
(0008682)
twaller (manager)
2010-07-28 17:45
edited on: 2010-07-28 17:49

ALL, SKIP, even STOP change to 0 after reopening.

(0008718)
twaller (manager)
2010-07-29 16:29

Both the mapping (from $0.... = $0.... -> $1.... = $0...)
and the return statement (for example, from return STOP to return 0)
are changed.
(0008719)
pnajvar (administrator)
2010-07-29 16:32

The problem seems to be more complex - the mapping is done based on metadata and not port-metadata pair
(0008729)
jlehotsky (manager)
2010-07-30 02:28
edited on: 2010-07-30 02:33

Caused by changes in bugfix 904. Therefore the bug's been out since Apr 2009.

(Personal NOTE: I only wish I could easily find the exact SVN commit diff that was fixing 904 - I created nice system integrated with bugtracker in the past, just click and you had repository, branch, commit number and diff ... although it was CVS and bugzilla at that time, I believe I can do it very easily with existing tools for SVN and jira/bugzilla (or even into mantis if it is going to stay for another year, it's not difficult) ... hope I can get few days after getting my uni diploma for doing this :) ... I believe other developers and managers will love it ;))

(0008730)
jlehotsky (manager)
2010-07-30 08:40

To fix this (and fix of 904), please open class OutputPortsTE.java, method getPortToAdd and comment out the if you find here, leave just the last line:

private PortTE getPortToAdd(InputPortsTE inputPorts, String outputPortId, DataRecordMetadata outputMetaItem,
            int orderIndex, boolean isCTL, TransformMappingModelTE model) {
           return new PortTE(outputMetaItem, orderIndex, false, isCTL, model);
    }
(0008731)
jlehotsky (manager)
2010-07-30 09:11

Problems with "return 0;":
  - explanation : TE doesn't implement the remembering of "return" at all
CTL1: it simply forgets and erases any return (thus assuming default "return ALL")
CTL2: we cannot do that, it would be compile error, so "return 0;" is hardcoded inside TransformsTE.java:getCode() (it was put there in the times where OK/SKIP/ALL was not supported)

Please either change to hardcoded "return ALL;" or if not sufficient, parse "return(.*);" in TrasformsTE constructor and reuse in getCode() - however I assume user won't put "return SKIP" or something else with "plain mapping transformation" - the only one that can be used in graphical trans editor... however, if you want assign to me and I can implement that...
(0008841)
mzatopek (developer)
2010-08-03 11:58

Bugfix #904 was reverted according description at http://bug.cloveretl.org/view.php?id=4615#c8730 [^]

'return' statement was changed to 'return ALL'

bug #904 was re-opened

- Issue History
Date Modified Username Field Change
2010-07-23 11:56 twaller New Issue
2010-07-23 11:57 twaller File Added: OK.grf
2010-07-28 17:36 twaller Priority high => urgent
2010-07-28 17:38 twaller Note Added: 0008681
2010-07-28 17:45 twaller Note Added: 0008682
2010-07-28 17:49 twaller Note Edited: 0008682 View Revisions
2010-07-28 18:24 pnajvar Assigned To => mzatopek
2010-07-28 18:24 pnajvar Severity major => block
2010-07-28 18:24 pnajvar Status new => assigned
2010-07-29 16:29 twaller Note Added: 0008718
2010-07-29 16:31 pnajvar File Added: CropperCapture[84].png
2010-07-29 16:32 pnajvar File Added: CropperCapture[86].png
2010-07-29 16:32 pnajvar Note Added: 0008719
2010-07-30 02:23 jlehotsky Assigned To mzatopek => jlehotsky
2010-07-30 02:23 jlehotsky Relationship added related to 0000904
2010-07-30 02:28 jlehotsky Note Added: 0008729
2010-07-30 02:33 jlehotsky Note Edited: 0008729 View Revisions
2010-07-30 07:00 jlehotsky Summary CTL2: Code is changed after reopening => TE: If there are same metadata assigned to input port and at least two output ports, mapping gets disinterpreted
2010-07-30 07:00 jlehotsky Description Updated View Revisions
2010-07-30 08:40 jlehotsky Note Added: 0008730
2010-07-30 09:11 jlehotsky Note Added: 0008731
2010-07-30 09:13 jlehotsky Assigned To jlehotsky => mzatopek
2010-08-03 11:58 mzatopek Note Added: 0008841
2010-08-03 11:58 mzatopek Status assigned => resolved
2010-08-03 11:58 mzatopek Fixed in Version => rel-3-0-0
2010-08-03 11:58 mzatopek Resolution open => fixed
2010-08-09 12:14 twaller Relationship added related to 0004833
2010-08-09 12:29 twaller Relationship added related to 0004834
2010-08-18 15:29 twaller Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker