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

add ticket_url to extra_data #4323

Merged
merged 1 commit into from
Oct 27, 2023
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
3 changes: 2 additions & 1 deletion .github/workflows/backend-tests-on-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ jobs:
--ignore tests/integration/workflows/test_workflows_tasks_upload.py \
--ignore tests/integration/workflows/test_arxiv_workflow.py \
--ignore tests/integration/workflows/test_edit_article.py \
--ignore tests/integration/workflows/test_views.py
--ignore tests/integration/workflows/test_views.py \
--ignore tests/integration/workflows/test_workflow_tasks_submission

Workflows-II:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion inspirehep/modules/search/bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
npm={
'invenio-search-js': '~1.4.0',
'angular-loading-bar': '~0.9.0',
'inspire-next-search-js': '~2.0.83'
'inspire-next-search-js': '~2.0.84'
},
)
4 changes: 3 additions & 1 deletion inspirehep/modules/workflows/tasks/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ def submit_snow_ticket(obj, queue, template, context, caller, recid, ticket_id_k
data=json.dumps(ticket_payload),
)
response.raise_for_status()
ticket_id = response.json()["ticket_id"]
response_json = response.json()
ticket_id = response_json["ticket_id"]

obj.extra_data[ticket_id_key] = ticket_id
obj.extra_data["ticket_url"] = response_json["ticket_url"]
obj.log.info("Ticket {0} created".format(ticket_id))
return ticket_id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_create_ticket_calls_tickets_create_with_template(workflow_app):
request_mocker.register_uri(
"POST",
"http://web:8000/tickets/create-with-template",
json={"ticket_id": "123"},
json={"ticket_id": "123", "ticket_url": "http//test.com/1"},
headers=_get_headers_for_hep_root_table_request(),
status_code=200,
)
Expand Down
Loading