influxdata / influxdata/ui

Editing the task code for a check creates inconsistent UI experience

Open
#1,783 7 comments 0 reactions 0 assignees View on GitHub
kind/bug team/automation team/ui team/unity
Dominant language
TypeScript
Stars
117
Forks
51
Avg merge
2d 15h
Merged PRs (30d)
4

Description

Thank you for reporting a bug in InfluxData UI.

- Please ask usage questions on the Influx Community site.
- https://community.influxdata.com/
- Please add a :+1: or comment on a similar existing bug report instead of opening a new one.
- https://github.com/influxdata/ui/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3Aclosed+sort%3Aupdated-desc+label%3Akind%2Fbug+
- Please check whether the bug can be reproduced with the latest release.
- The fastest way to fix a bug is to open a Pull Request.
- https://github.com/influxdata/ui/pulls

**Steps to reproduce:**
List the minimal actions needed to reproduce the behavior.

1. Create a task via the UI
2. Save it
3. In the configuration options for the check, choose "edit task"

it shows this message:
![Screen Shot 2021-06-23 at 10 47 06 AM](https://user-images.githubusercontent.com/25036188/123118134-5d036180-d410-11eb-9fa7-741e457ae3a1.png)

but this is not true. I can delete all the code and write something new, and save it. Then I can go back to the check and the editor opens with all the previous values. If I save it, it overwrites the custom code I wrote.

**Expected behavior:**
if I edit the code directly, it should be converted to a regular task that is no longer editable by the C+N interface. This task should be recognized as no longer being an alert and be displayed in the tasks list page.

**Actual behavior:**
I can edit the code and then without any warning, that code can be overwritten.

** Side Effects **
Any action that regenerates checks or has some assumption that installed checks are all on the same template will have inconsistent results with a check that is manually edited.

**Suggestions to fix:**
allowing the user to see the code read-only would be safe.

`convert to task` would be acceptable too, if they require editing the code directly.

the checks UI needs to inspect the task code and make sure that it matches the expected template before it allows editing/saving it using the UI dialog.

**Note:**
This bug identically impacts notification rules.

**Environment info:**
all cloud environments.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.