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

JIRA: Problem with transitions #1479

Open
MAngel666 opened this issue Dec 9, 2024 · 1 comment
Open

JIRA: Problem with transitions #1479

MAngel666 opened this issue Dec 9, 2024 · 1 comment

Comments

@MAngel666
Copy link

MAngel666 commented Dec 9, 2024

I've a script, it shows me all transition id's for a ticket.
This script shows these transitions for a ticket:

ID: 11, Name: In Bearbeitung
ID: 21, Name: On Hold
ID: 31, Name: Schliessung
ID: 141, Name: Frist verlängern
ID: 101, Name: False Positive

If I use this code with the same Ticket:

jira = Jira(url = '[https://%s](https://%25s/)' % config['credentials']['atlassian_host'], username = config['credentials']['atlassian_user'], password = config['credentials']['atlassian_pass'])

fields = {
                "duedate": list_issues[issue],
}

jira.set_issue_status(issue, "Frist verlängern ", fields)

I get this error: "requests.exceptions.HTTPError: 'transition'-ID muss eine Ganzzahl sein" (translated: 'transition' ID must be an integer)
What can be the problem? If I use the method: jira.set_issue_status_by_transition_id(issue, 141) it does work but I cant set the field parameter and I need it there.

Could it be a problem with the umlauts in transition name (german "special" character like äüö etc)?

@MAngel666
Copy link
Author

The umlauts are not the problem... This method is IMHO "buggy":

def get_transition_id_to_status_name(self, issue_key, status_name):
        for transition in self.get_issue_transitions(issue_key):
            if status_name.lower() == transition["to"].lower():
                return int(transition["id"])

if I list the transitions with get_issue_transitions(issue_key) I get a list with transition NAME elements BUT the get_transition_id_to_status_name method returns transition TO elements.

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

1 participant