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

Merging next to main for release 2.6.0 #19

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.16
rev: v1.18
hooks:
- id: org-hook
- id: package-app-dependencies
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--no-verify', '--exclude-files', '^servicenow.json$']
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2016-2023 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
14 changes: 1 addition & 13 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
Splunk SOAR ServiceNow
Copyright (c) 2016-2023 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Third-party Software Attributions:

Library: beautifulsoup4
Version: 4.9.1
License: MIT
Copyright 2004-2017 Leonard Richardson
Copyright 2004-2019 Leonard Richardson
Copyright 2018 Isaac Muse

Library: python-magic
Version: 0.4.18
License: MIT
Expand All @@ -21,8 +14,3 @@ License: MIT
License: Zope
Copyright 1987-2006 implementation only works for dates between
Copyright 2003-2019 Stuart Bishop <[email protected]>

Library: requests
Version: 2.25.0
License: Apache 2.0
Kenneth Reitz
94 changes: 85 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# ServiceNow

Publisher: Splunk
Connector Version: 2.5.0
Connector Version: 2.6.0
Product Vendor: ServiceNow
Product Name: ServiceNow
Product Version Supported (regex): ".\*"
Minimum Product Version: 6.1.0
Minimum Product Version: 6.2.1

This app integrates with ServiceNow to perform investigative and generic actions

Expand Down Expand Up @@ -211,6 +211,7 @@ VARIABLE | REQUIRED | TYPE | DESCRIPTION
[get variables](#action-get-variables) - Get variables for a ticket/record
[run query](#action-run-query) - Gets object data according to the specified query
[query users](#action-query-users) - Gets user data according to the specified query, username, or system ID
[search sources](#action-search-sources) - Search for records across multiple tables
[on poll](#action-on-poll) - Ingest tickets from SNOW

## action: 'test connectivity'
Expand Down Expand Up @@ -302,7 +303,7 @@ action_result.data.\*.depreciated_amount | string | | $0.00
action_result.data.\*.depreciation | string | |
action_result.data.\*.depreciation_date | string | |
action_result.data.\*.description | string | | My computer is not detecting the headphone device. It could be an issue with the USB port.
action_result.data.\*.display_name | string | | SW000077 - Microsoft ASP.NET 2011
action_result.data.\*.display_name | string | | SW000077 Test
action_result.data.\*.disposal_reason | string | |
action_result.data.\*.due | string | |
action_result.data.\*.due_date | string | |
Expand All @@ -329,7 +330,7 @@ action_result.data.\*.location | string | |
action_result.data.\*.made_sla | string | | true
action_result.data.\*.managed_by | string | |
action_result.data.\*.merged_into | string | |
action_result.data.\*.model.display_value | string | | Microsoft ASP.NET 2011
action_result.data.\*.model.display_value | string | | ASP.NET 2011
action_result.data.\*.model.link | string | | https://dev78070.service-now.com/api/now/table/cmdb_model/81bfae3f37601000deeabfc8bcbe5d2d
action_result.data.\*.model_category.display_value | string | | Software License
action_result.data.\*.model_category.link | string | | https://dev78070.service-now.com/api/now/table/cmdb_model_category/35bf2d4137101000deeabfc8bcbe5dbd
Expand Down Expand Up @@ -401,7 +402,7 @@ action_result.data.\*.upon_approval | string | | Proceed to Next Task
action_result.data.\*.upon_reject | string | | Cancel all future Tasks
action_result.data.\*.urgency | string | | 2 - Medium
action_result.data.\*.user_input | string | |
action_result.data.\*.vendor.display_value | string | | Microsoft
action_result.data.\*.vendor.display_value | string | | PRB000050 Test
action_result.data.\*.vendor.link | string | `url` | https://dev78070.service-now.com/api/now/table/core_company/0e8b8e650a0a0b3b004f285ffbb1a4fc
action_result.data.\*.warranty_expiration | string | |
action_result.data.\*.watch_list | string | |
Expand Down Expand Up @@ -1418,7 +1419,7 @@ PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
DATA PATH | TYPE | CONTAINS | EXAMPLE VALUES
--------- | ---- | -------- | --------------
action_result.status | string | | success failed
action_result.parameter.description | string | | Investigative actions to check for the presence of phapp_servicenow
action_result.parameter.description | string | | Switch occasionally drops connections
action_result.parameter.fields | string | | {"made_sla":true,"severity":3,"description":"This is testing description"}
action_result.parameter.short_description | string | | phapp_servicenow, Multiple action need to be taken
action_result.parameter.table | string | `servicenow table` | incident
Expand Down Expand Up @@ -2258,9 +2259,9 @@ action_result.data.\*.work_end | string | |
action_result.data.\*.work_notes | string | |
action_result.data.\*.work_notes_list | string | |
action_result.data.\*.work_start | string | |
action_result.summary.total_tickets | numeric | | 2 68
action_result.summary.total_tickets | numeric | | 2
action_result.message | string | | Important data: value
summary.total_objects | numeric | | 1 2
summary.total_objects | numeric | | 1
summary.total_objects_successful | numeric | | 1

## action: 'query users'
Expand Down Expand Up @@ -2297,7 +2298,7 @@ action_result.data.\*.date_format | string | |
action_result.data.\*.default_perspective | string | |
action_result.data.\*.department.link | string | `url` | https://dev116432.service-now.com/api/now/table/cmn_department/a581ab703710200044e0bfc8bcbe5de8
action_result.data.\*.department.value | string | `md5` | a581ab703710200044e0bfc8bcbe5de8
action_result.data.\*.email | string | `email` | herman@phantom.us
action_result.data.\*.email | string | `email` | abc@pqr.us
action_result.data.\*.employee_number | string | |
action_result.data.\*.enable_multifactor_authn | string | | false
action_result.data.\*.failed_attempts | string | | 0
Expand Down Expand Up @@ -2349,6 +2350,81 @@ action_result.message | string | | Total tickets: 1
summary.total_objects | numeric | | 1
summary.total_objects_successful | numeric | | 1

## action: 'search sources'
Search for records across multiple tables

Type: **investigate**
Read only: **True**

To find the list of search source IDs for the <b>sysparm_search_sources</b> parameter, follow this path in servicenow UI: All > Workspace Experience > Administration > Search Sources. Once there, click with two fingers/right click on the source name and copy the sys_id.

#### Action Parameters
PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
--------- | -------- | ----------- | ---- | --------
**sysparm_term** | required | Search record for the given term | string |
**sysparm_search_sources** | required | SYS ID of search sources, Comma-separated list allowed | string | `servicenow ticket sysid`

#### Action Output
DATA PATH | TYPE | CONTAINS | EXAMPLE VALUES
--------- | ---- | -------- | --------------
action_result.status | string | | success failed
action_result.parameter.sysparm_search_sources | string | `servicenow ticket sysid` | tec681c771testfedf0bcbe2c2606c
action_result.parameter.sysparm_term | string | | Resolved
action_result.data.\*.result_count | numeric | |
action_result.data.\*.search_results.\*.fields.\*.label | string | | Number
action_result.data.\*.search_results.\*.fields.\*.label_plural | string | | Numbers
action_result.data.\*.search_results.\*.fields.\*.max_length | numeric | | 40
action_result.data.\*.search_results.\*.fields.\*.name | string | | number
action_result.data.\*.search_results.\*.fields.\*.reference | string | | sys_user_group
action_result.data.\*.search_results.\*.fields.\*.type | string | | string
action_result.data.\*.search_results.\*.label | string | | Problem
action_result.data.\*.search_results.\*.limit | numeric | | 20
action_result.data.\*.search_results.\*.page | numeric | | 1
action_result.data.\*.search_results.\*.query | string | | 123TEXTQUEtest=Fix Applied
action_result.data.\*.search_results.\*.record_count | numeric | |
action_result.data.\*.search_results.\*.records.\*.data.assignment_group.display | string | |
action_result.data.\*.search_results.\*.records.\*.data.assignment_group.value | string | |
action_result.data.\*.search_results.\*.records.\*.data.caller_id.display | string | | System Administrator
action_result.data.\*.search_results.\*.records.\*.data.caller_id.value | string | | 6816f7test016401c5a33be04be441
action_result.data.\*.search_results.\*.records.\*.data.category.display | string | | Inquiry / Help
action_result.data.\*.search_results.\*.records.\*.data.category.value | string | | inquiry
action_result.data.\*.search_results.\*.records.\*.data.cmdb_ci.display | string | |
action_result.data.\*.search_results.\*.records.\*.data.cmdb_ci.value | string | |
action_result.data.\*.search_results.\*.records.\*.data.number.display | string | | INC000001
action_result.data.\*.search_results.\*.records.\*.data.number.value | string | | INC000001
action_result.data.\*.search_results.\*.records.\*.data.opened_at.display | string | | 2023-04-05 00:59:28
action_result.data.\*.search_results.\*.records.\*.data.opened_at.value | string | | 2023-04-05 07:59:28
action_result.data.\*.search_results.\*.records.\*.data.priority.display | string | | 5 - Planning
action_result.data.\*.search_results.\*.records.\*.data.priority.value | string | | 5
action_result.data.\*.search_results.\*.records.\*.data.related_incidents.display | string | | 0
action_result.data.\*.search_results.\*.records.\*.data.related_incidents.value | string | | 0
action_result.data.\*.search_results.\*.records.\*.data.resolution_code.value | string | |
action_result.data.\*.search_results.\*.records.\*.data.state.display | string | | New
action_result.data.\*.search_results.\*.records.\*.data.state.value | string | | 1
action_result.data.\*.search_results.\*.records.\*.data.sys_id.display | string | | c673edctest1106401f1e3f153af11
action_result.data.\*.search_results.\*.records.\*.data.sys_id.value | string | | td673test1106401f1e3f153af11
action_result.data.\*.search_results.\*.records.\*.metadata.description | string | |
action_result.data.\*.search_results.\*.records.\*.metadata.thumbnail_url | string | |
action_result.data.\*.search_results.\*.records.\*.metadata.title | string | | hello
action_result.data.\*.search_results.\*.records.\*.record_class_name | string | | incident
action_result.data.\*.search_results.\*.records.\*.record_url | string | | /incident.do?sys_id=test978221106401f1e99f11&sysparm_view=text_search
action_result.data.\*.search_results.\*.records.\*.sys_id | string | | c673ettest97822119953af11
action_result.data.\*.search_results.\*.records.\*.table | string | | incident
action_result.data.\*.search_results.\*.sys_id | string | | test897862996401f1e3f1990e
action_result.data.\*.search_results.\*.term | string | | Resolved
action_result.data.\*.sources.\*.condition.display | string | |
action_result.data.\*.sources.\*.condition.value | string | |
action_result.data.\*.sources.\*.name.display | string | | Tasks-Tickets
action_result.data.\*.sources.\*.name.value | string | | Tasks-Tickets
action_result.data.\*.sources.\*.source_table | string | | Problem
action_result.data.\*.sources.\*.sys_id | string | `servicenow ticket sysid` | test8699964099f153af0e99
action_result.data.\*.term | string | | Resolved
action_result.summary | string | |
action_result.summary.total_records | numeric | | 1
action_result.message | string | | Total records: 0
summary.total_objects | numeric | | 1
summary.total_objects_successful | numeric | | 1

## action: 'on poll'
Ingest tickets from SNOW

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: __init__.py
#
# Copyright (c) 2016-2023 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions release_notes/2.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Fixed bug in pagination logic [PAPP-33317]
* Added new 'search sources' action support [PAPP-30131]
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
beautifulsoup4==4.9.1
python-magic==0.4.18
pytz==2021.1
Loading
Loading