Unable to edit tenant name with API
Hi, a little bug from the manage iq jansa2 tenants api
<
url: "{{ miq_api }}/tenants/1"
method: POST
body: "{"action" : "edit", "resource" : { "name" : "test", "description" : "test" } }"
>
does update only the description and not the name.
I also does not fail
Updating name is possible via the UI in the Company Name field froé server settings.
@miq-bot assign @akhilkr128
@akhilkr128 'akhilkr128' is an invalid assignee, ignoring...
If we pass use_config_for_attributes as false along with the body we can edit tenant's name other wise it will pick the company name from settings.
An example curl:
curl --user username:password -i -X POST -H "Accept: application/json" -d '{ "action": "edit", "resource" : { "name" : "test", "description" : "test", "use_config_for_attributes" : "false" } }' http://url/api/tenants/1
if you want to pick the name, login text from settings pass the use_config_for_attributes as true.
That's a weird requirement - @kbrock Do you recall why this is needed? I would think "false" should be the default if one does not pass the parameter.
This issue will happen only when the table value of use_config_for_attributes is true. If we create a new record in the tenant table use_config_for_attributes default value will be false and then "use_config_for_attributes": "false" is not required in the resource body to edit the tenant name.
This issue has been automatically marked as stale because it has not been updated for at least 3 months.
If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.