ankitpokhrel / jira-cli

🔥 Feature-rich interactive Jira command line.
MIT License
3.9k stars 197 forks source link

"Description" is not visible in Jira despite filling it in code #667

Closed JoMetso closed 5 months ago

JoMetso commented 1 year ago

I'm creating an Epic with multiple Child issues attached. The Epic only has two main commands: summary and body, which also are described in variables. When trying to create the Epic, everything works fine in the terminal with no error messages, but when I look in Jira Software the Epic is created with correct summary but the description is empty. Meaning the things I wrote in code did not execute as expected. I attach some screenshots of my test code so you can see the issue in depth.

Since there is no error messages and I can't find anything wrong with code (after reading multiple documents and asked AI) it's hard to figure out what went wrong. I've also read similar problems in this repo but no luck to fix the problem.

Any suggestions on how to fix the problem of transferring the "body" from the code to the "description" in Jira Software is highly appreciated.

Skärmavbild 2023-09-29 kl  11 26 05 Skärmavbild 2023-09-29 kl  11 26 36
ankitpokhrel commented 8 months ago

Hi @JoMetso, I remember facing the same issue and I think this should already be fixed (can't find the commit tho). Could you please try with the recent build? Thanks!

RootMePLS commented 7 months ago

Same here! Firstly, @ankitpokhrel thank you for your wonderful tool, you save tons of my time ❤️

While debugging, I can see how epic_description passes to the command, but after execution, I have an empty Epic

def create_epic(epic_issues):
    epic_summary = epic_issues['summary']
    epic_labels = epic_issues['labels']
    epic_description = epic_issues['description']

    command = [jira_cli_path, 'epic', 'create', '--no-input', f'-n{epic_summary}', f'-s{epic_summary}', f'-b{epic_description}']
    for label in epic_labels:
        command += [f'-l{label}']
    result = subprocess.run(command, capture_output=True, text=True)
    if result.stderr:
        print("Error creating Epic:", result.stderr)
    else:
        epic_id = result.stdout.strip().split('/')[-1]
        print("Epic created successfully:", result.stdout)

    for issue in epic_issues['Tasks']:
        issuetype = issue['type']
        labels = issue['labels']
        summary = issue['summary']
        description = get_description_from_openai(issue['summary'])
        create_issue(issuetype,labels,summary,description,epic_id)

If I try to copy-paste the "command" to the shell, it will work normally.

RootMePLS commented 6 months ago

@ankitpokhrel any news here?

ankitpokhrel commented 5 months ago

Looks like the issue is when using --no-input parameter?

ankitpokhrel commented 5 months ago

@JoMetso @fishhead108 This should be fixed with #728 and will be included in the next release. Let me know if you still have issue with this.