Skip to content

[BUG]: ___Dashboard.chapters There is an error when answering the prompts of this dashboard. #221

@hustontrevor

Description

@hustontrevor

Description

prompted Dashboards are unable to access chapters

Steps To Reproduce

Create a dashboard that requires prompt answers to create an instance. The Dashboard class has no mechanism to answer prompts and an instance is required to get the chapter list.

Code Snippet

with Connection(source_url, username, password, ssl_verify=False) as mstr_conn:
                environment = Environment(connection=mstr_conn)                
                projs = environment.list_loaded_projects()
                
                p: Project
                for p in projs:
                    mstr_conn.select_project(project_id=p.id)
                    dashboards = list_dashboards(connection=mstr_conn, project_id=p.id)
                    for dash in dashboards:
                        path = "\\".join([a['name'] for a in dash.ancestors[1:]] )
                        
                        for chapter in dash.chapters:  # !!!  fails here  !!!
                            for page in chapter.pages:
                                for viz in page.visualizations:
                                    outf.write(f"\"{p.name}\",\"{path}\",\"{dash.name}\",\"{chapter.name}\",\"{page.name}\",\"{viz.name}\",\"{viz.visualization_type}\"\n")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnewThe item has just been created and was not seen by MSTR developer yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions