Skip to content

onSDKDismissedHandler wrong callback arguments values #620

@kchasiotis

Description

@kchasiotis

Steps to Reproduce the Problem

Show Feedback Form

BugReporting.showWithOptions(BugReporting.reportType.feedback, [
    BugReporting.option.emailFieldOptional,
]);

When the form is submitted listen for it

BugReporting.onSDKDismissedHandler(function(dismissType, reportType) {
    if (dismissType === 'SUBMIT' && reportType === 'feedback') {
        console.log('user feedback');
    }
    console.log('-----------');
    console.log(dismissType);
    console.log(reportType);
    console.log(Instabug.dismissType.submit);
    console.log(BugReporting.reportType.feedback);
});

Expected Behaviour

The following logs return integer values based on the types below

console.log(Instabug.dismissType.submit);
console.log(BugReporting.reportType.feedback);

dismissType

export enum dismissType {
  submit,
  cancel,
  addAttachment
}

reportType

enum reportType {
  bug,
  feedback,
  question
}

Actual Behaviour

dismissType gets the string value 'SUBMIT'
reportType gets the value 'feedback'

Instabug integration code

SDK Version

"version": "10.8.1"

React Native, iOS and Android Versions

"react": "17.0.1"

Android versions:

   ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 29
        targetSdkVersion = 29
        ndkVersion = "20.1.5948944"
    }

note: Tested on android only

Device Model

Activity

MahmoudMehisen

MahmoudMehisen commented on Sep 2, 2021

@MahmoudMehisen
Contributor

@kchasiotis Thanks for reporting this. We'll look further into this and get back to you.

kchasiotis

kchasiotis commented on Sep 8, 2021

@kchasiotis
Author

@MahmoudMehisen cool, thank you!

linked a pull request that will close this issue[MOB-11561] Add `onDimissHandler` API #868on Dec 28, 2022
linked a pull request that will close this issue on Jan 15, 2023
stale

stale commented on Feb 20, 2023

@stale

This issue has been automatically marked as pending feedback because we need additional information to be able to investigate it further. It will be closed in 7 days if it remains inactive. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

WIPWork In Progress

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @kchasiotis@MahmoudMehisen@TheBuggedYRN

    Issue actions

      onSDKDismissedHandler wrong callback arguments values · Issue #620 · Instabug/Instabug-React-Native