Awx: Can't edit inventory on workflow_job_template once configured

Created on 18 Nov 2019  路  5Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY

When we create a Workflow and we save it, field Inventory can be edited. Once we configure a certain inventory and we click on save, this field becomes disabled and we can't edit anymore.

As far as we can see, ng-disabled is set to:

ng-disabled="!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddOrEdit) || !canEditInventory"

when WF template is created without configuring an inventory:

<input type="text" class="form-control Form-textInput input-medium lookup ng-pristine ng-untouched ng-valid ng-empty ng-valid-awlookup ng-valid-valid-resource" ng-model="inventory_name" name="inventory_name" ng-disabled="!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddOrEdit) || !canEditInventory" data-basepath="inventory" data-source="inventory" data-query="?name__iexact=:value" autopopulatelookup="false" ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 300, 'blur': 0 } }" awlookup="">

this works fine because we have permissions and we can edit. But when you configure an inventory and click save and you edit it again, then we have this code:

<input type="text" class="form-control Form-textInput input-medium lookup ng-pristine ng-untouched ng-valid ng-not-empty ng-valid-awlookup ng-valid-valid-resource" ng-model="inventory_name" name="inventory_name" ng-disabled="!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddOrEdit) || !canEditInventory" data-basepath="inventory" data-source="inventory" data-query="?name__iexact=:value" autopopulatelookup="false" ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 300, 'blur': 0 } }" awlookup="" disabled="disabled">

At this time, we're not able to modify inventory in a Workflow Job, So I think is something wrong when permissions are checked when inventory is not empty at Angular level but I can't find the reason.

ENVIRONMENT
  • AWX version: 9.0.1
  • AWX install method: openshift
  • Ansible version: 2.8.5
  • Operating System: Windows 10
  • Web Browser: Chrome and Firefox (latest versions)
STEPS TO REPRODUCE
  1. Create a WF template without configuring an inventory
  2. Check that you can edit inventory field.
  3. Configure any inventory and save.
  4. Edit again WF
  5. In our case, inventory is disabled.
EXPECTED RESULTS

Be able to modify inventory field in a Workflow Job when is configured.

ACTUAL RESULTS

Not able to modify inventory field in a Workflow Job when is configured

ui medium bug

All 5 comments

Same issue in my environment.

@mabashian you or somebody on UI have time to take a peek at this one?

Verified this as an admin and a regular user that has admin permissions over the related inventory. Both are able to edit the inventory now.

@dsesami @ryanpetrello @marshmalien thank you very much!

Was this page helpful?
0 / 5 - 0 ratings