Skip to content

IHostNavigationService .getPageRoute() does not return correct results in all situations #138

@TheAtomAnt

Description

@TheAtomAnt
  1. Create a contribution that fulfills the following:
    "type": "ms.vss-work-web.backlog-panel", "targets": ["ms.vss-work-web.requirement-backlog-toolpane"]

  2. in that contribution, add a button that calls an async event handler when clicked

  3. in the event handler method, use getService to obtain an IHostNavigationService service

  4. with that IHostNavigationService instance, call the getPageRoute() method.

  5. Click the button and review the rout information provided

  6. Now, select a different backlog level, in the default basic process, switch from "Epics" to "Issues", or switch to another defined backlog level if you are using a different process template.

  7. Click the button and review the rout information provided

  8. Notice that this second click of the button AFTER you changed to another backlog level does NOT show the correct backlog Level

public render(): JSX.Element {
...
       <Button
              text="Test"
               onClick={() => this.OnTestClick()}
       />
...
}
    async OnTestClick() {
        const navigationService = await SDK.getService<IHostNavigationService>(CommonServiceIds.HostNavigationService);
        const data = await navigationService.getPageRoute();
        const dataString = JSON.stringify(data, null, 4);
        console.clear();
        console.log(dataString);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions