Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

fix: Custom Question Answering in MS Teams#6603

Merged
tracyboehrer merged 2 commits into
mainfrom
anishprasad01/CQA_Teams_QnAIdCastFix
Mar 17, 2023
Merged

fix: Custom Question Answering in MS Teams#6603
tracyboehrer merged 2 commits into
mainfrom
anishprasad01/CQA_Teams_QnAIdCastFix

Conversation

@anishprasad01
Copy link
Copy Markdown
Contributor

Fixes #6599

Description

The ResetOption method in the QnAMakerDialog class attempts to cast the QnAId from the context into an int64. Microsoft Teams sends back a JObject which causes this conversion to fail. This PR modifies the casting logic to attempt a long.TryParse first, and defaults the QnAId to 0 if the conversion is not possible.

Specific Changes

  • Add a TryParse of the QnAId object. Take the casted variable if it succeeds, or a default value of 0 if it fails.

Testing

All QnA tests passing.
image

@anishprasad01 anishprasad01 added customer-reported Issue is created by anyone that is not a collaborator in the repository. Area: AI-QnAMaker The issue is related to QnA Maker labels Mar 16, 2023
@anishprasad01 anishprasad01 requested a review from a team as a code owner March 16, 2023 17:48
@anishprasad01 anishprasad01 self-assigned this Mar 16, 2023
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 344405

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.009%) to 79.095%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/Microsoft.Bot.Connector.Streaming/Application/TimerAwaitable.cs 1 68.25%
Totals Coverage Status
Change from base Build 343443: -0.009%
Covered Lines: 25812
Relevant Lines: 32634

💛 - Coveralls

@BruceHaley
Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.AI.QnA.dll

@anishprasad01 anishprasad01 added the Automation: Parity with js The PR needs to be ported to JS label Mar 17, 2023
@tracyboehrer tracyboehrer merged commit faacc99 into main Mar 17, 2023
@tracyboehrer tracyboehrer deleted the anishprasad01/CQA_Teams_QnAIdCastFix branch March 17, 2023 18:22
@anishprasad01 anishprasad01 added Automation: No parity PR does not need to be applied to other languages. and removed Automation: Parity with js The PR needs to be ported to JS labels Mar 17, 2023
This was referenced May 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Area: AI-QnAMaker The issue is related to QnA Maker Automation: No parity PR does not need to be applied to other languages. customer-reported Issue is created by anyone that is not a collaborator in the repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom question answering multiturn does not work with QnAMakerDialog

4 participants