OpenFn / lightning

OpenFn/Lightning ⚡️ is the newest version of the OpenFn DPG and provides a web UI to visually manage complex workflow automation projects.
https://openfn.github.io/lightning/
GNU Lesser General Public License v3.0
131 stars 36 forks source link

Name a dataclip #311

Open taylordowns2000 opened 2 years ago

taylordowns2000 commented 2 years ago

User story

As an admin that wants to run a job with an arbitrary dataclip (#238) I want to be able to select that input dataclip from a list of saved and named dataclips.

Consider the two types of NAMED dataclips:

Type 1: There are inputs I want to save to test my jobs. These, when saved, form a “test suite” of cases that we’d like to validate for a particular job in a flow. They are results from previous runs (save as a test input for job3 in the flow) and saved webhook requests.

Type 2: There are constants, or blobs of JSON data, that non-technical users want to build via a simple UI and, most commonly, store “mapping” data that links, e.g. a clinic code to it’s underlying clinic name.

Details

Currently, there is a picklist which allows the user to change the type of a dataclip. This picklist should dissappear. Instead, they should have a button which says "SAVE AS" and if they do so, they should be prompted to give that dataclip a name which follows the same naming pattern as projects (i.e., it's a slug.) and be able to edit the body of the dataclip.

Once it's saved as a named_input, they can not convert it back to a run_result or a http_request.

Once it's saved as a named_input, they can set the name to null, effectively removing it from the "named globals" list.

Implementation notes

Release notes

Tests

QA

stuartc commented 2 years ago

re a conversation with @amberrignell:

Marking cloned dataclips with 'associated jobs'

I brought up my thoughts around a suggested feature relating to 'tagging' the associated job/s for a cloned dataclip; I'd like to try implementing this without that feature - the thought is that the list of available dataclips for running (when coming from a job) will be ordered by relevance, and in the (less common) case where a cloned dataclip was created without running - it will be associated on the first run. My hope is to avoid having extra columns which in the context of datclips will be 99% empty. The approach outlined here shares almost the entire implementation requirement of the initial one. So if we feel that having a user editable 'associated job' linked to a dataclip we can add that on top.

It do see that this issue doesn't make any mention of what I'm referring to, so this note could be a non-issue and can be ignored.