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

Smartlink Error with Inline Case Search Fix #34834

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

Jtang-1
Copy link
Contributor

@Jtang-1 Jtang-1 commented Jun 28, 2024

Product Description

Addresses error that is encountered when smartlinking to a module that also uses inline case search.

Technical Summary

Related Jira Ticket

example of current endpoint block:

 <endpoint id="update_store">
    <argument id="case_id"/>
    <stack>
      <push>
        <command value="'m1'"/>
        <query id="results:inline" value="https://www.commcarehq.org/a/jonathantangtest/phone/case_fixture/fcd6a07be33442168d88a23d85294880/">
          <data key="case_type" ref="'case'"/>
          <data key="case_id" ref="$case_id"/>
        </query>
        <datum id="case_id" value="$case_id"/>
      </push>
    </stack>
  </endpoint>

while following a smart link to an inline case search module, case_id is used for both "Case Fixture API" (phone/case_fixture) and "Case Search API" (phone/search). However, for "Case Search API", case_id is indexed as @case_id so using case_id as the parameter incorrectly returned no results.

Feature Flag

Session Endpoints

Inline Case Search

Safety Assurance

Safety story

Locally tested

Automated test coverage

add tests that "case_id" criteria key returns expected cases

QA Plan

no QA

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@Jtang-1 Jtang-1 marked this pull request as ready for review June 28, 2024 07:25
@Jtang-1 Jtang-1 merged commit 8b315dd into master Jun 28, 2024
13 checks passed
@Jtang-1 Jtang-1 deleted the jt/smartlink-could-not-select-case-error-fix branch June 28, 2024 20:18
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.

3 participants