在 jira 中执行简单的 jython 脚本的问题
problems with execute simple jython script in jira
我有 jira,我尝试在工作流 jython 脚本上执行。
我已经在步骤中成功添加了它们(在我的例子中 "starting")并保存。
但在那之后,当我在 jira 中单击此按钮时出现错误:
root cause: Traceback (most recent call last):
File "/var/atlassian/application-data/jira/jss/jython/__init_interpreter__.py", line 6, in <module> codecs.setDefaultEncoding('utf-8')
LookupError: no codec search functions registered: can't find encoding 'utf-8'
It seems that you have tried to perform an illegal workflow operation. If you think this message is wrong, please contact your JIRA administrators.
请帮忙:有init_interpreter.py:
# -*- coding: UTF-8 -*-
import sys
if sys.getdefaultencoding() != 'utf-8':
from org.python.core import codecs
codecs.setDefaultEncoding('utf-8')
from com.quisapps.jira.plugin.workflow import JythonFileUtil
path = JythonFileUtil.getInstance().getJythonPath()
if path not in sys.path:
sys.path.append(path)
from com.quisapps.jira.jss.jython import JythonUtil
path = JythonUtil.getJythonPath()
if path not in sys.path:
sys.path.append(path)
还有我尝试执行的新脚本:
summary = parameters['summary'][0]
if summary.find('OMG')=>0:
result=False
description = u'Ururu'
invaild_fields['summary'] = description
我在插件 - 脚本套件部分尝试了 "Reinstall everything",但没有帮助。
另外如果需要的话,catalina.out
有错误
尝试重新安装jython。从官方网站获取 .jar
文件:http://www.jython.org/downloads.html
尝试重新安装 Jira Scripting Suite:
- 转到管理页面。
- 在 Scripting Suite 部分下 select JSS 安装程序
- 单击重新安装所有内容
如果没有帮助 - 重新安装 Scripting Suite for JIRA 附加组件
我有 jira,我尝试在工作流 jython 脚本上执行。 我已经在步骤中成功添加了它们(在我的例子中 "starting")并保存。 但在那之后,当我在 jira 中单击此按钮时出现错误:
root cause: Traceback (most recent call last):
File "/var/atlassian/application-data/jira/jss/jython/__init_interpreter__.py", line 6, in <module> codecs.setDefaultEncoding('utf-8')
LookupError: no codec search functions registered: can't find encoding 'utf-8'
It seems that you have tried to perform an illegal workflow operation. If you think this message is wrong, please contact your JIRA administrators.
请帮忙:有init_interpreter.py:
# -*- coding: UTF-8 -*-
import sys
if sys.getdefaultencoding() != 'utf-8':
from org.python.core import codecs
codecs.setDefaultEncoding('utf-8')
from com.quisapps.jira.plugin.workflow import JythonFileUtil
path = JythonFileUtil.getInstance().getJythonPath()
if path not in sys.path:
sys.path.append(path)
from com.quisapps.jira.jss.jython import JythonUtil
path = JythonUtil.getJythonPath()
if path not in sys.path:
sys.path.append(path)
还有我尝试执行的新脚本:
summary = parameters['summary'][0]
if summary.find('OMG')=>0:
result=False
description = u'Ururu'
invaild_fields['summary'] = description
我在插件 - 脚本套件部分尝试了 "Reinstall everything",但没有帮助。
另外如果需要的话,catalina.out
有错误尝试重新安装jython。从官方网站获取 .jar
文件:http://www.jython.org/downloads.html
尝试重新安装 Jira Scripting Suite:
- 转到管理页面。
- 在 Scripting Suite 部分下 select JSS 安装程序
- 单击重新安装所有内容
如果没有帮助 - 重新安装 Scripting Suite for JIRA 附加组件