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

Fixing issue in get_transition() #5

Closed Seitanas closed 6 years ago

Seitanas commented 6 years ago

Hello, there is a small problem in get_transition() function. It tries to get an id of config.jira_transition in the first JIRA event (hard-coded as jira.issue(config.jira_project + '-1')). Function fails if event does not exist. This patch matches config.jira_transition for the current event.

OSidorenkov commented 6 years ago

It look's like nice! I thought that everyone have a task like 'PRJ-1'.

rokuUK commented 4 years ago

hi I have problem with your script from the command line works fine but through gui it ends up with errors

error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/lib/zabbix/alertscripts/jirabix.py", line 231, in main() File "/usr/lib/zabbix/alertscripts/jirabix.py", line 205, in main config.jira_issue_type, priority) File "/usr/lib/zabbix/alertscripts/jirabix.py", line 24, in create_issue jira = jira_login() File "/usr/lib/zabbix/alertscripts/jirabix.py", line 20, in jira_login return JIRA(options=jira_server, basic_auth=(config.jira_user, config.jira_pass)) File "/usr/lib/python2.7/site-packages/jira/client.py", line 431, in init self._try_magic() File "/usr/lib/python2.7/site-packages/jira/client.py", line 2569, in _try_magic import magic File "/usr/lib/python2.7/site-packages/magic.py", line 54, in _open = _libraries['magic'].magic_open File "/usr/lib64/python2.7/ctypes/init.py", line 373, in getattr func = self.getitem(name) File "/usr/lib64/python2.7/ctypes/init.py", line 378, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: python: undefined symbol: magic_open

I'm using Zabbix 4.4 do you have any suggestions thanks