Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel copy don't respect field changes #4458

Closed
mti-sk opened this issue Nov 20, 2024 · 4 comments · Fixed by openhab/openhab-webui#2891
Closed

Channel copy don't respect field changes #4458

mti-sk opened this issue Nov 20, 2024 · 4 comments · Fixed by openhab/openhab-webui#2891
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@mti-sk
Copy link

mti-sk commented Nov 20, 2024

Hi,
When I try to make a copy of a channel on any thing in my version of openhab, the copy is created, but except for the channel name, all the edited fields are unchanged. Which is not even obvious at first glance (you are under the impression that you have a new channel with different settings). The copy is completely identical to the template, without any modifications made.

Expected Behavior

When I fill in or overwrite a field in the copy of the channel, my change is reflected in the newly created channel.

Current Behavior

Unfortunately, it is not like that. The edited field is not reflected in the copy. This is the source of unexpected behavior.

Possible Solution

Apparently, this is an error when creating the copy. No changes have been made to individual fields in the copy.
The solution is twofold:

  1. reflect the required field modifications in the created copy
  2. make it clear to the user that when the copy is created, any field modifications will not be taken into account, for example by disabling the fields.

Steps to Reproduce (for Bugs)

  1. Create any thing
  2. Create a channel "channel1" and fill in the values ​​like MQTT State Topic or MQTT Command Topic,...
  3. Mark the channel created in point 2 and make a copy of it
  4. In the copy "channel1_copy" change the fields like MQTT State Topic or MQTT Command Topic,...
  5. Save the copy
  6. When you open the copy "channel1_copy" the fields will remain the same as the channel "channel1", even if you have modified the fields.

Context

Your Environment

OpenHAB 4.2.2
Odroid N2+ (ARM)

@mti-sk mti-sk added the bug An unexpected problem or unintended behavior of the Core label Nov 20, 2024
@florian-h05
Copy link
Contributor

Could you please elaborate a bit more where this issue happens?
When copying channels in the UI or in a .things file?

@florian-h05
Copy link
Contributor

Nevermind, this is not needed, I just created a fix for this bug.
For future bugs like this, please create them in openhab-webui, as most Things going wrong in the UI are actual UI bugs and not core bugs.

florian-h05 added a commit to florian-h05/openhab-webui that referenced this issue Dec 1, 2024
Fixes openhab/openhab-core#4458.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
florian-h05 added a commit to openhab/openhab-webui that referenced this issue Dec 1, 2024
Fixes openhab/openhab-core#4458.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
@florian-h05
Copy link
Contributor

@openhab/core-maintainers Can you please close this issue as it has been fixed in openhab/openhab-webui#2891?

@matmai
Copy link

matmai commented Dec 16, 2024

I still have issues with the value transformation of a channel copy, please have a look at #2770.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants