hop icon indicating copy to clipboard operation
hop copied to clipboard

[Bug]: User defined Java expression - fields insertion on selected text

Open dave-csc opened this issue 7 months ago • 2 comments

Apache Hop version?

2.13

Java version?

17.0.2

Operating system

Linux

What happened?

  1. Have a relatively long expression in the Java expression field, such as: "This is a relatively long string " + [replace_me] + " and it could really be even longer"
  2. Modify the expression: select the text [replace_me], and then double click on a field on the left panel to insert it in place

It happens sometimes that the field is not correctly inserted, specifically if you select the text to replace with:

  • mouse press before [
  • mouse drag
  • mouse release after ]

In this case, the field name will overwrite the expression starting from the last character.

This operation cannot be undone with CTRL + Z or similar (you can only cancel all modifications)

Issue Priority

Priority: 2

Issue Component

Component: Hop Gui

dave-csc avatar May 16 '25 09:05 dave-csc

I was unable to reproduce it under Windows and Hop 2.14

nadment avatar May 21 '25 19:05 nadment

record_2025-05-26_16-22-39.zip

I attach a screen grab of what can happen, even with Hop 2.14 😅 (using Ubuntu 24.04 on a Windows VirtualBox, no particular graphics options enabled). In this case, I meant to replace the "1" with a field, but the "1" is not removed and the field overwrites a trailing space

dave-csc avatar May 26 '25 14:05 dave-csc