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

Prefill Task parameters with query params #1123

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

etiennebarrie
Copy link
Member

There have been multiple attempts at adding filling the form with query params (#1046, #1051, #1113). This one uses the Run and Task objects, and solves #1116 at the same time.

This is based on #1122 and just adds what's needed to support query params filling the form.

@task = TaskDataShow.prepare(
params.fetch(:id),
runs_cursor: params[:cursor],
arguments: params.except(:id, :cursor, :controller, :action).permit!,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this prevents Tasks from having a cursor attribute, so I'll remove :cursor from this list and the cursor will be used both for the runs and the Task inputs. Which means it may end up showing an empty list of runs below the form to start a task, but I think that's ok.

Base automatically changed from preserve-user-input to main November 21, 2024 15:26
@etiennebarrie etiennebarrie merged commit 7d0f2be into main Nov 21, 2024
31 checks passed
@etiennebarrie etiennebarrie deleted the prefill-inputs branch November 21, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants