Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30479

'hammer recurring-logic info' generates duplicate fields.

    • 2
    • False
    • Low
    • None
    • None
    • None
    • No Coverage
    • Yes

      Description of problem:

      The 'hammer recurring-logic info' command generates duplicate fields when used for recurring logic.

      Also, 'hammer recurring-logic info --help' shows the same duplicate fields available.

       

       

      How reproducible:

      100% on Satellite version 6.14, 6.15, 6.16 (RHEL 8/9)

       

       

      Is this issue a regression from an earlier version:

      It worked as expected on Satellite version 6.13 but started failing from the 6.14 version.

       

      Steps to Reproduce:

      1. Run hammer command on Satellite 6.14/6.15/6/16:

      ~~~

      1. hammer recurring-logic info --id 1 --fields 'Cron line',Action,'Last occurrence','Next occurrence'

      Cron line:       0 0 * * *

      Action:          Check for long running tasks

      Last occurrence: 2025-01-16 00:00:12 +0000

      Next occurrence: 2025-01-17 00:00:00 +0000

      Action:          Check for long running tasks

      Last occurrence: 2025/01/16 00:00:12

      Next occurrence: 2025/01/17 00:00:00

      ~~~

       

      2. Help also shows the same result:

      ~~~

      hammer recurring-logic info --help

      Usage:{}

          hammer recurring-logic <info|show> [OPTIONS]

       

      Options:{}

      --fields LIST                           Show specified fields or predefined field sets only. (See below)

      --id VALUE                              Id of the recurring logic

      --location[-id|-title] VALUE/NUMBER     Set the current location context for the request

      --name VALUE                            Name to search by

      --organization[-id|-title] VALUE/NUMBER Set the current organization context for the request

      -h, --help                              Print help

       

      Predefined field sets:{}

        ---------------|---|-------

        FIELDS          | ALL | DEFAULT

        ---------------|---|-------

        Id              | x   | x

        Cron line       | x   | x

        Action          | x   | x

        Last occurrence | x   | x

        Next occurrence | x   | x

        Task count      | x   | x

        Action          | x   | x

        Last occurrence | x   | x

        Next occurrence | x   | x

        Iteration       | x   | x

        Iteration limit | x   | x

        Iteration limit | x   | x

        Repeat until    | x   | x

        State           | x   | x

        Purpose         | x   | x

        ---------------|---|-------

      ~~~

       

       

       

      Actual behavior:
      Duplicate fields are generated with hammer command:

      ~~~

      1. hammer recurring-logic info --id 1 --fields 'Cron line',Action,'Last occurrence','Next occurrence'

      Cron line:       0 0 * * *

      Action:          Check for long running tasks

      Last occurrence: 2025-01-16 00:00:12 +0000

      Next occurrence: 2025-01-17 00:00:00 +0000

      Action:          Check for long running tasks

      Last occurrence: 2025/01/16 00:00:12

      Next occurrence: 2025/01/17 00:00:00

      ~~~

       

       

      Expected behavior:

      This is required to remove duplicate fields:

      ~~~

      1. hammer recurring-logic info --id 1 --fields 'Cron line',Action,'Last occurrence','Next occurrence'

      Cron line:       0 0 * * *

      Action:          Check for long running tasks

      Last occurrence: 2025-01-16 00:00:12 +0000

      Next occurrence: 2025-01-17 00:00:00 +0000

      ~~~

       

       

      Business Impact / Additional info:

      The duplicate fields affect automation.

              Unassigned Unassigned
              rhn-support-mkushwah Mohit Kushwah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: