Skip to content

Commit

Permalink
Merge pull request #4323 from MJedr/add-ticket-link
Browse files Browse the repository at this point in the history
add ticket_url to extra_data
  • Loading branch information
MJedr authored Oct 27, 2023
2 parents 5d3f79c + f642a18 commit 74fa109
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
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

0 comments on commit 74fa109

Please sign in to comment.