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

watchdog:show silently ignores username column #5198

Closed
GuyPaddock opened this issue Aug 5, 2022 · 1 comment
Closed

watchdog:show silently ignores username column #5198

GuyPaddock opened this issue Aug 5, 2022 · 1 comment

Comments

@GuyPaddock
Copy link

Describe the bug
It does not seem to be possible to get the username column to appear in exports from watchdog;show.

To Reproduce

  1. Run drush watchdog:show --format=json --fields=username --count=2500.
  2. Run drush watchdog:show --format=json --fields=wid,username --count=2500.
  3. Run drush watchdog:show --format=csv --fields=username --count=2500.
  4. Run drush watchdog:show --format=csv --fields=wid,username --count=2500.

Expected behavior
In all three cases, the "Username" field should be populated.

Actual behavior
The behavior varies by what other fields are included:

  1. With JSON output, asking for just the username causes the JSON to be returned with an empty username field in all the results.
  2. With JSON output, asking for any field alongside the username causes the username field to be omitted.
  3. With CSV output, asking for just the username causes blank lines to be returned for all rows.
  4. With CSV output, asking for any field alongside the username causes the username field to be omitted (not even the heading is present).

Workaround
Is there another way to do the desired action?
Not to my knowledge.

System Configuration

Q A
Drush version? 10.6.2
Drupal version? 9.3.21
PHP version 7.4.30
OS? Linux

Additional information
Reproducible on Pantheon as well as in Lando with the Pantheon recipe.

@weitzman
Copy link
Member

Fixed in #5251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants