-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
SetGridField fixes #31318
SetGridField fixes #31318
Conversation
…into XSUP-30932/SetGridField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sapirshuker LGTM, nice work
@@ -362,24 +369,27 @@ def main(): # pragma: no cover | |||
keys_from_nested=argToList(args.get('keys_from_nested')) | |||
) | |||
# Execute automation 'setIncident` which change the Context data in the incident | |||
res = demisto.executeCommand("setIncident", { | |||
res_set = demisto.executeCommand("setIncident", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why changing the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The res was overwritten by the line:
res = demisto.executeCommand("getIncidents", {"id": demisto.incident().get("id")})
and I would like to save it so I can raise an error if necessary
…into XSUP-30932/SetGridField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
This PR was automatically updated by a GitHub Action
To stop automatic version bumps, add the |
…into XSUP-30932/SetGridField
custom_fields = data[0].get("CustomFields") if data and data[0].get("CustomFields") else {} | ||
if (not is_playground) and table and grid_id not in custom_fields: | ||
raise ValueError(get_error_message(grid_id)) | ||
if is_error(res_set): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add is_error
to the getIncidents
command as well in line 392
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! see small comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Add what @ilaner asked and merge
* SetGridField fixes * update docker * add support for incident_id * do only needed change * revert yml * docker image * revert ruff changes * revert ruff changes * fixes * fixes * fixes * RN conflicts * Update SetGridField.py * add tests * fix test * add tests * Update SetGridField_test.py * fixes CR * fix CR review,update docker * Bump pack from version CommonScripts to 1.12.57. * fix CR review * fix CR review --------- Co-authored-by: Content Bot <bot@demisto.com>
* SetGridField fixes * update docker * add support for incident_id * do only needed change * revert yml * docker image * revert ruff changes * revert ruff changes * fixes * fixes * fixes * RN conflicts * Update SetGridField.py * add tests * fix test * add tests * Update SetGridField_test.py * fixes CR * fix CR review,update docker * Bump pack from version CommonScripts to 1.12.57. * fix CR review * fix CR review --------- Co-authored-by: Content Bot <bot@demisto.com>
* SetGridField fixes * update docker * add support for incident_id * do only needed change * revert yml * docker image * revert ruff changes * revert ruff changes * fixes * fixes * fixes * RN conflicts * Update SetGridField.py * add tests * fix test * add tests * Update SetGridField_test.py * fixes CR * fix CR review,update docker * Bump pack from version CommonScripts to 1.12.57. * fix CR review * fix CR review --------- Co-authored-by: Content Bot <bot@demisto.com>
* SetGridField fixes * update docker * add support for incident_id * do only needed change * revert yml * docker image * revert ruff changes * revert ruff changes * fixes * fixes * fixes * RN conflicts * Update SetGridField.py * add tests * fix test * add tests * Update SetGridField_test.py * fixes CR * fix CR review,update docker * Bump pack from version CommonScripts to 1.12.57. * fix CR review * fix CR review --------- Co-authored-by: Content Bot <bot@demisto.com>
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
fixes: https://jira-dc.paloaltonetworks.com/browse/XSUP-30932
https://jira-dc.paloaltonetworks.com/browse/XSUP-31038
https://jira-dc.paloaltonetworks.com/browse/XSUP-30050
Description
Fix an issue that the script to raise an uninformative error when trying to run SetGridField from the playground.
Must have