OSidorenkov / zabbix-jira

Python module that allows you to create tasks in Jira by the trigger from Zabbix
MIT License
40 stars 21 forks source link

Issue in JIRA was not transitioned to Done. #8

Closed OlegsBazalickis closed 5 years ago

OlegsBazalickis commented 5 years ago

Hi, Issue registration works fine (graph also attached). But when problem resolved transition to Done doesn't work. Interesting that script doesn't write to file jirabix.db. Maybe we need to install additional software on server?

hAh0L13 commented 5 years ago

Did you resolve this problem?

Hi, Issue registration works fine (graph also attached). But when problem resolved transition to Done doesn't work. Interesting that script doesn't write to file jirabix.db. Maybe we need to install additional software on server?

medojr commented 5 years ago

I have same issue as OlegsBazalickis. And problem is that it can't write to SQLlite database. I tried to give all rights to jirabix.db but still without success.

Traceback (most recent call last): File "/usr/lib/zabbix/alertscripts/jirabix.py", line 230, in main() File "/usr/lib/zabbix/alertscripts/jirabix.py", line 216, in main c.execute("INSERT INTO events VALUES (?, ?);", (trigger_id, issue_key)) sqlite3.OperationalError: unable to open database file

hAh0L13 commented 5 years ago

In my case probem was in permissions:

Everything works fine for me now

UPD: maybe you know it, but check workflows in your JIRA project - issue/task/etc must have flow from OPEN to DONE

OSidorenkov commented 5 years ago

That's right. The problem is access rights to the database file. Verify that the file has been created and that the zabbix user has access to it.

pjain287074 commented 5 years ago

Hi, I am facing the same issue I am getting below error.

Traceback (most recent call last): File "/usr/lib/zabbix/alertscripts/jirabix.py", line 229, in main() File "/usr/lib/zabbix/alertscripts/jirabix.py", line 222, in main close_issue(issue_key, get_transition(issue_key)) File "/usr/lib/zabbix/alertscripts/jirabix.py", line 43, in close_issue jira.transition_issue(issue, status) File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 126, in wrapper result = func(*arg_list, **kwargs) File "/usr/local/lib/python2.7/dist-packages/jira/client.py", line 1559, in transition_issue raise JIRAError("Invalid transition name. %s" % transition) jira.exceptions.JIRAError: JiraError HTTP Invalid transition name. None

the transition state of Jira issue is not changing to Done, Apart from this everything is working fine.

OSidorenkov commented 5 years ago

Most likely the problem is in the wrong jira_transition in your config.py. You can check all available transitions in your project using test/check_transition_id.py in debug mode. For example: image