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

Bot fails to create jira ticket when Issue/Priority are not selected #282

Closed
LanceSandino opened this issue Jul 13, 2023 · 1 comment
Closed

Comments

@LanceSandino
Copy link
Contributor

When you click on Create a Jira Ticket the modal seems to default to Task as the Issue Type and low as the Priority (as seen in the image) but it doesn't actually default.

image

If you do not select an Issue Type and Priority you get the following error:

incident-bot 07-13 18:14:45 ERROR:slack_bolt.App:Error: 'NoneType' object has no attribute 'get'
incident-bot 07-13 18:14:45 Traceback (most recent call last):
incident-bot 07-13 18:14:45   File "/usr/local/lib/python3.11/site-packages/slack_bolt/listener/thread_runner.py", line 120, in run_ack_function_asynchronously
incident-bot 07-13 18:14:45     listener.run_ack_function(request=request, response=response)
incident-bot 07-13 18:14:45   File "/usr/local/lib/python3.11/site-packages/slack_bolt/listener/custom_listener.py", line 50, in run_ack_function
incident-bot 07-13 18:14:45     return self.ack_function(
incident-bot 07-13 18:14:45            ^^^^^^^^^^^^^^^^^^
incident-bot 07-13 18:14:45   File "/incident-bot/bot/slack/modals.py", line 1700, in handle_submission
incident-bot 07-13 18:14:45     parsed = parse_modal_values(body)
incident-bot 07-13 18:14:45              ^^^^^^^^^^^^^^^^^^^^^^^^
incident-bot 07-13 18:14:45   File "/incident-bot/bot/templates/tools.py", line 24, in parse_modal_values
incident-bot 07-13 18:14:45     result[title] = content.get("selected_option").get("value")
incident-bot 07-13 18:14:45                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
incident-bot 07-13 18:14:45 AttributeError: 'NoneType' object has no attribute 'get'
incident-bot 07-13 18:14:48 WARNING:slack_bolt.App:handle_submission didn't call ack()
incident-bot 07-13 18:14:48 WARNING:slack_bolt.App:Unhandled request ({'type': 'view_submission', 'view': {'type': 'modal', 'callback_id': 'open_incident_create_jira_issue_modal'}})
incident-bot 07-13 18:14:48 ---
incident-bot 07-13 18:14:48 [Suggestion] You can handle this type of event with the following listener function:
incident-bot 07-13 18:14:48
incident-bot 07-13 18:14:48 @app.view("open_incident_create_jira_issue_modal")
incident-bot 07-13 18:14:48 def handle_view_submission_events(ack, body, logger):
incident-bot 07-13 18:14:48     ack()
incident-bot 07-13 18:14:48     logger.info(body)
incident-bot 07-13 18:14:48
LanceSandino added a commit to LanceSandino/incident-bot that referenced this issue Jul 13, 2023
This selects the initial defaults for the create jira ticket modal.
echoboomer pushed a commit that referenced this issue Jul 15, 2023
* Fix jira ticket default from issue #282

This selects the initial defaults for the create jira ticket modal.

* bump version to 1.4.14

* bump config.py to 1.4.14
@echoboomer
Copy link
Owner

Fixed by #283

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

2 participants