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

POST to service_categories returns blank name #7130

Closed
ocket8888 opened this issue Oct 12, 2022 · 0 comments · Fixed by #7383
Closed

POST to service_categories returns blank name #7130

ocket8888 opened this issue Oct 12, 2022 · 0 comments · Fixed by #7383
Labels
low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops

Comments

@ocket8888
Copy link
Contributor

ocket8888 commented Oct 12, 2022

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

$ topost -kp service_categories '{"name": "test"}'
{
	"alerts": [
		{
			"text": "serviceCategory was created.",
			"level": "success"
		}
	],
	"response": {
		"lastUpdated": "2022-10-12 17:57:14+00",
		"name": ""
	}
}

Expected behavior:

According to the docs (and what would make sense) the name field is supposed to be populated with the name it actually created. Since the current docs example shows it working that way, I'm going to assume that it used to so this is a regression bug.

Steps to reproduce:

topost -kp service_categories '{"name": "test"}'

@ocket8888 ocket8888 added the bug something isn't working as intended label Oct 12, 2022
@ocket8888 ocket8888 changed the title service_categories POST to service_categories returns blank name Oct 12, 2022
@ocket8888 ocket8888 added Traffic Ops related to Traffic Ops low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version low difficulty the estimated level of effort to resolve this issue is low and removed bug something isn't working as intended labels Oct 12, 2022
jagan-parthiban added a commit to jagan-parthiban/trafficcontrol that referenced this issue Mar 7, 2023
Updated GenericCreateNameBasedID in api/generic_crud.go and used it in Create() function traffic_ops_golang/servicecategory.go
jagan-parthiban added a commit to jagan-parthiban/trafficcontrol that referenced this issue Mar 8, 2023
…ories while not breaking other functionalities that existed earlier.
rimashah25 pushed a commit that referenced this issue Mar 10, 2023
* Initial commit to fix bug #7130

Updated GenericCreateNameBasedID in api/generic_crud.go and used it in Create() function traffic_ops_golang/servicecategory.go

* #7130 - Updated GenericCreateNameBasedID to server serviceCategories while not breaking other functionalities that existed earlier.

* Updated CHANGELOG.md

* Updated generic_crud.go's GenericCreateNameBasedID

* Removed code repetition in generic_crud.go's GenericCreateNameBasedID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one regression bug a bug in existing functionality introduced by a new version Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant