ankitpokhrel / jira-cli

🔥 Feature-rich interactive Jira command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

JoMetso opened this issue · comments

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

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!

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.

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

@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.