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

Filter empty requirements #23

Open
eosti opened this issue Nov 18, 2023 · 2 comments
Open

Filter empty requirements #23

eosti opened this issue Nov 18, 2023 · 2 comments

Comments

@eosti
Copy link
Member

eosti commented Nov 18, 2023

image It's very easy to accidentally create and then lose empty requirements requirements, and there's a number of them in the database right now. The "proper" fix would be removing them from the requirements database entirely, but it'd be nice to automatically filter out requirements with no name.
Copy link

dosubot bot commented Nov 18, 2023

🤖

Hello @eosti,

Nice to meet you! I'm Dosu, an automated bot here to help you with your issues and inquiries related to the tree-visualizer repository. While waiting for a human maintainer, I'll be here to assist you. Rest assured, I'm currently looking into your issue and will provide you with a detailed answer shortly.

Copy link

dosubot bot commented Nov 18, 2023

🤖

Hello @eosti,

Nice to meet you! I'm Dosu, an AI bot here to assist with bugs, answer your questions, and guide you on becoming an effective contributor. While we're waiting for a human maintainer, I'm here to help. Let's get started with your issue!

Sure, it's possible to implement a feature to automatically filter out requirements with no name in the tree-visualizer. This can be achieved by modifying the ngOnChanges method in the OrgChartComponent class to also check if the node's title is not empty. Here's a sample code snippet:

ngOnChanges(changes: SimpleChanges) {
    const visibleList = changes["visibleList"].currentValue;
    this.diagram.nodes.each(node => {
        node.visible = visibleList.includes(node.data.id) && node.data.title !== '';
    })
}

In this code, node.data.title !== '' checks if the title of the node is not empty. If it is empty, the node will not be visible. This will effectively filter out any requirements with no name.

As for the current method used to display the nodes, the tree-visualizer uses the GoJS library. The nodes are displayed using a Diagram object from GoJS, which is assigned to the diagram property of the OrgChartComponent class. The diagram object's model property is set to the model input property of the OrgChartComponent class, which is of type go.GraphLinksModel. This model represents the nodes and links of the diagram.

You can find more details about this in the OrgChartComponent file in the repository.

Please let me know if you need further assistance or clarification.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

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

No branches or pull requests

1 participant