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

issue edit updating description with stdin content with --no-input parameter #727

Open
vyprabhu opened this issue Apr 5, 2024 · 3 comments

Comments

@vyprabhu
Copy link

vyprabhu commented Apr 5, 2024

Describe the bug

Please provide following details

  1. JiraCLI Version:
    (Version="v1.5.1", GitCommit="", CommitDate="", GoVersion="go1.20.12", Compiler="gc", Platform="linux/amd64")
    Please paste the output of jira version here.
  2. Are you using Jira cloud or on-premise jira server?
    cloud
    Please paste the output of jira serverinfo here.
    Version: 1001.0.0-SNAPSHOT
    Build Number: 100248
    Deployment Type: Cloud
    Default Locale: en_US
  3. What operating system are you using? Also mention version.
    Windows 11
    Please type your answer here. eg: macOS Big Sur 11.5.1
  4. What terminal are you using? Also mention version.
    Please type your answer here. eg: iTerm 2 Build 3.4.10
    WSL
    
    

To Reproduce

Steps to reproduce the behavior:

  1. run jira issue edit --label "abc" --no-input
  2. Since --no-input parameter is provided, the prompts for summary, description and metadata is hidden and not prompted. But still the description of the issue is replaced with content from stdin.

Expected behavior
since no other parameter (be it summary / description / any other field) is not passed, the other fields should not be updated.

Screenshots

Additional context

@ankitpokhrel
Copy link
Owner

Hi @vyprabhu are you just running jira issue edit --label "abc" --no-input or you are streaming contents from stdin echo "something" | jira issue edit --label "abc" --no-input?

@vyprabhu
Copy link
Author

vyprabhu commented Apr 10, 2024

So basically, i'm searching for some keys matching a particular criteria and then I am running "jira issue edit --label "abc" --no-input" thru bash script to update the label for each key. I'm not piping anything to this command.

@vyprabhu
Copy link
Author

vyprabhu commented May 1, 2024

@ankitpokhrel

Not sure if you progressed on this one... I found a workaround in the meantime.

Research and Discovery : I observed that the command jira issue edit --label "abc" --no-input still follows the approach of jira issue edit --label "abc" and it waits for an "Enter" command for the description field even if you provide no-input parameter. And hence it pulls the previous output of stdin.

Workaround / Solution : The below workaround was discovered to add char code for "Enter" in the Description field alongwith --no-input to stop the command from piping in stdin:

jira issue edit -b$'\x0a' -l"$lbl" --no-input

Note that the $'\x0a' in the description field referred to as '-b' acts as an enter command without any input / amendment to the description field.

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