Bug 1785624 - [UI] Importing templates with associate 'never' is not resulting as expected
Summary: [UI] Importing templates with associate 'never' is not resulting as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Templates Plugin
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: 6.8.0
Assignee: Ondřej Pražák
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: 1778146
TreeView+ depends on / blocked
 
Reported: 2019-12-20 13:35 UTC by Jitendra Yejare
Modified: 2020-10-27 13:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:59:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28629 0 Normal Closed Importing templates with 'associate: never' does not import provisioning templates 2020-10-28 17:22:09 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:00:06 UTC

Description Jitendra Yejare 2019-12-20 13:35:24 UTC
Description of problem:
1. Importing Provisioning Template from UI with associate "never" throws an error "the template id can't be blank".
2. The other kind of templates is being associated with the taxos which they are being imported and it shouldn't be.
3. If imported from any taxo, then all the taxos are being assigned to imported templates.

Version-Release number of selected component (if applicable):
Satellite 6.7 snap 6

How reproducible:
Always

Steps to Reproduce:
1. Keep(in local dir/git) the templates to be imported in a satellite that has multiple orgs and locs in their metadata. Make sure all the taxonomies in metadata are available in the satellite.
2. Attempt to import those templates and set associate as 'never'. Import in org and loc by switching the taxonomies context in satellite. 
3. Observe the taxonomies associated with imported templates.

Actual results:
1. Importing Provisioning Template from UI with associate "never" throws an error "the template id can't be blank".
2. The other kind of templates is being associated with the taxos which they are being imported and it shouldn't be as we have set associate to 'new'.
3. If imported from any taxo, then all the taxos are being assigned to imported templates.

Expected results:
1. Importing Provisioning Template from UI with associate "never" should be a success and shouldn't throw any error.
2. Any kind of templates shouldn't be associated with the taxos.


Additional info:

Comment 3 Ondřej Pražák 2020-01-03 11:07:20 UTC
I see 2 issues reported in this BZ:

1. Importing Provisioning Template from UI with "associate: never" gives "templateKindId: can't be blank" error even though template kind is specified in metadata

- Valid bug, template kind should be assigned and template should save without errors.

2. Templates are associated with taxonomies from metadata when "associate: new" is used and all taxonomies in metadata already exist.

- As far as I can tell, this works as intended. The "new" refers to the template, not the taxonomies. It means: if the template is newly created, add associations from metadata. BZ1785547 tracks importing from taxonomy context.


Cloning upstream to fix 1.

Comment 4 Ondřej Pražák 2020-01-03 11:09:03 UTC
Created redmine issue https://projects.theforeman.org/issues/28629 from this bug

Comment 5 Bryan Kearney 2020-01-20 15:01:01 UTC
Upstream bug assigned to oprazak

Comment 6 Bryan Kearney 2020-01-20 15:01:04 UTC
Upstream bug assigned to oprazak

Comment 7 Bryan Kearney 2020-02-28 13:00:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28629 has been resolved.

Comment 8 Jitendra Yejare 2020-03-13 09:00:57 UTC
@BK/@Brad,

Is there any chance to get this in 6.7 snap 16 now. The flag was missing and I added the same 2nd Mar, but still its not pulled for 6.7 snaps.

Comment 14 Jitendra Yejare 2020-07-02 16:50:26 UTC
Verified!

Steps:
---------------
1. Attempt to import the Provisioning templates from UI, where the templates have correct metadata for their template kind.


Behavior:
--------------
1. The provisioning templates are imported successfully and showing the correct template kind.
2. The issue described in `Description` of but that throws `kind can't be blank` is no more observed.

Comment 17 errata-xmlrpc 2020-10-27 12:59:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366


Note You need to log in before you can comment on or make changes to this bug.