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

Burndown isParentOf function throws error on tasks without body #21

Closed
bavicj opened this issue Oct 25, 2021 · 5 comments
Closed

Burndown isParentOf function throws error on tasks without body #21

bavicj opened this issue Oct 25, 2021 · 5 comments

Comments

@bavicj
Copy link

bavicj commented Oct 25, 2021

TypeError: Cannot read properties of null (reading 'indexOf')

Screenshot 2021-10-25 at 09 55 01

@jens-markussen
Copy link
Contributor

Hi @bavicj. Can you be a bit more specific here. Are you trying to deploy yoda-webhook function? What are the hard-coded parts (e.g. owner1 = rentalport). issue1 and issue2 in the code is assume to be full GitHub issues. It somehow seems like you are trying to unit-test yoda-webhook?

@bavicj
Copy link
Author

bavicj commented Oct 25, 2021

Hi @jens-markussen
Thank for quick reply. We are using https://hewlettpackard.github.io/yoda/yoda-burndown.html -> Show Table functionality.
There are no hardcoded parts (its just google dev tools debugger, showing current values).

When I clicked on button "Show table" , no table was rendered for some milestones, and error was thrown in javascript console. So I only debugged it and found out that you are not checking whether issue2.body is null before accessing its indexOf method. I understand you are checking issue body to find specific texts, but can be that some tasks have only title (were created directly from github project view), without need to have actual body/comment.

@jens-markussen
Copy link
Contributor

Ok, got it. Will fix !

@jens-markussen
Copy link
Contributor

Issue reproduced. Interestingly it does not occur in GitHub Enterprise (GHE) version which is in use at my company (HPE).

@jens-markussen
Copy link
Contributor

Fixed. A few more protections had to be added for issues without body. I cannot be 100% sure that these work perfectly across all tools. If any problems detected, do let us know.

@jens-markussen jens-markussen changed the title Burndown isParentOf function throws error on tasks without body Burndown isParentOf function throws error on tasks without body Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants