JiraAddComment
Use this script to add a comment with a tag (the "Comment tag to Jira" defined in the instance configuration) as an entry in XSOAR, which will then be mirrored as a comment to a Jira issue. This script should be run within an incident.
- Type
- python
- Pack
- Jira
Source
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def add_comment(args: Dict[str, Any]) -> CommandResults:
comment_body = args.get("comment", "")
tags = argToList(args.get("tags", ""))
return CommandResults(readable_output=comment_body, mark_as_note=True, tags=tags or None)
def main(): # pragma: no cover
try:
demisto.debug("JiraAddComment is being called")
res = add_comment(demisto.args())
return_results(res)
except Exception as ex:
return_error(f"Failed to execute JiraAddComment. Error: {ex!s}")
if __name__ in ["__builtin__", "builtins", "__main__"]:
main()
README
Use this script to add a comment with a tag (the “Comment tag to Jira” defined in the instance configuration) as an entry in XSOAR, which will then be mirrored as a comment to a Jira issue. This script should be run within an incident.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 6.8.0 |
Inputs
| Argument Name | Description |
|---|---|
| comment | comment to be added to the Jira issue. |
| tags | The comment tag. Use the comment entry tag (defined in your instance configuration) to mirror the comment to Jira. |
Outputs
There are no outputs for this script.