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

[WM-2556] Show Literal Input Values #4729

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Conversation

kpierre13
Copy link
Contributor

@kpierre13 kpierre13 commented Mar 20, 2024

Jira Ticket: https://broadworkbench.atlassian.net/browse/[WM-2556]

Summary of changes:

What

  • Adding a check for literal values in the Submission Details page

Why

  • Previously, inputs that were literal values would not appear in the input value column.

Testing strategy

  • Tested in live environment
image image

@kpierre13 kpierre13 marked this pull request as ready for review March 20, 2024 16:41
@kpierre13 kpierre13 requested review from a team as code owners March 20, 2024 16:41
@@ -96,6 +96,10 @@ const SubmissionDetailsInputsTable = ({ configuredInputDefinition }: SubmissionD
.source as RecordLookupInputSource;
return h(TextCell, [source.record_attribute]);
}
if (inputTableData[rowIndex].source.type === 'literal') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't remember the exact schema definition, but will this also work for Optional literal inputs? If not I wonder if we should also add support for that too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, that's a good question. I'll try to find a workflow with an optional to try and see how this works.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the fact that it's the source instead of the type means it'll either be a "none" or a "literal", there's no such thing as a "optional literal" source type... but I might be wrong and 100% worth testing!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Optional literal inputs work with this change as well
image

rsaperst
rsaperst previously approved these changes Mar 21, 2024
Copy link
Contributor

@salonishah11 salonishah11 left a comment

Choose a reason for hiding this comment

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

One comment regarding addition of tests otherwise LGTM!

@@ -96,6 +96,10 @@ const SubmissionDetailsInputsTable = ({ configuredInputDefinition }: SubmissionD
.source as RecordLookupInputSource;
return h(TextCell, [source.record_attribute]);
}
if (inputTableData[rowIndex].source.type === 'literal') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what is the state of tests for this component, but it would be good to add some tests for this.

@kpierre13 kpierre13 added this pull request to the merge queue Mar 21, 2024
@kpierre13 kpierre13 removed this pull request from the merge queue due to a manual request Mar 21, 2024
@@ -96,6 +96,10 @@ const SubmissionDetailsInputsTable = ({ configuredInputDefinition }: SubmissionD
.source as RecordLookupInputSource;
return h(TextCell, [source.record_attribute]);
}
if (inputTableData[rowIndex].source.type === 'literal') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the fact that it's the source instead of the type means it'll either be a "none" or a "literal", there's no such thing as a "optional literal" source type... but I might be wrong and 100% worth testing!

Copy link

sonarcloud bot commented Mar 22, 2024

@kpierre13 kpierre13 added this pull request to the merge queue Mar 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 22, 2024
@kpierre13 kpierre13 added this pull request to the merge queue Mar 22, 2024
Merged via the queue into dev with commit a5883bb Mar 22, 2024
9 checks passed
@kpierre13 kpierre13 deleted the wm-2556_populate_inputs_kp branch March 22, 2024 16:01
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.

5 participants