Opened 7 years ago
Closed 7 years ago
#13069 closed defect (fixed)
TicketsBoardPlubin: Save-Error KeyError: u'new'
Reported by: | Owned by: | jpsave | |
---|---|---|---|
Priority: | normal | Component: | TicketsBoardPlugin |
Severity: | normal | Keywords: | KeyError |
Cc: | Trac Release: | 1.0 |
Description
Hello,
we are using the ticketsboard-plugin. We are able to view the board, move the ticket over the board. But if we click the save-button, the issue "KeyError: u'new'" will appear. (The Issue will appear with each step.)
I was trying out TicketsBoard 1.2.2 and 1.2.3 - both with same issue.
Any Idee, how to fix it?
Error-Report from agilo:
How to Reproduce
While doing a POST operation on /ticketsboard
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'__FORM_TOKEN': u'08780a5f99a9ded47d043e9b', 'ticketsboard_changes': u'572:status=new', 'ticketsboard_submit': u'Save Changes', 'user': u''}
User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
System Information
Trac | 1.0.1
|
Agilo | 1.3.15
|
Babel | 0.9.6
|
Docutils | 0.8.1
|
Genshi | 0.6 (with speedups)
|
mod_python | 3.3.1
|
MySQL | server: "5.5.47-0+deb7u1", client: "5.5.47", thread-safe: 1
|
MySQLdb | 1.2.3
|
Pygments | 1.5
|
Python | 2.7.3 (default, Mar 14 2014, 12:14:27) [GCC 4.7.2]
|
pytz | 2012c
|
setuptools | 0.6
|
Subversion | 1.6.17 (r1128011)
|
jQuery | 1.7.2
|
Enabled Plugins
binary-agilo | 1.3.15
|
ticketsboardplugin.assignreviewer | N/A
|
ticketsboardplugin.web-ui | N/A
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/ticketsboardplugin/web_ui.py", line 204, in process_request File "build/bdist.linux-i686/egg/ticketsboardplugin/web_ui.py", line 349, in _update_tickets_changes KeyError: u'new'
Attachments (1)
Change History (10)
comment:2 Changed 7 years ago by
Replying to anonymous:
Adding Attachments is not available: (IndexError: pop from empty list)
Fixed now.
Changed 7 years ago by
comment:3 follow-up: 9 Changed 7 years ago by
You can avoid the error by upgrading to a newer version of Trac, such as the latest 1.0-stable, which is 1.0.13. The exception is not seen in newer versions of Trac 1.0-stable because states_action
returns a default dict for unknown key (since trac:r13444, included in Trac 1.0.3).
It appears the code is not doing what it's intended to do though, so a proper fix will be needed to make the plugin fully functional. On the line where the exception is generated, the status is used as a key for the states_action
dict, however the keys of the dict are actions, not statuses.
Given the first commit for this plugin was 2015-02-19 and 1.0.3 was released about a month before that, it could be the case that the plugin was developed against Trac 1.0.3, and so the error went unnoticed by the developer.
comment:4 Changed 7 years ago by
Thanks for the advice. I was upgrading trac to Version 1.0.13 in our maintaince window today. (trac.ini was not changed) Now i got a other issue by clicking the save button after: "TypeError: save_changes() takes at least 3 arguments (2 given)"
(I move a ticket from new to reviewing and click the save button.)
Do you have any idea how to fix it?
How to Reproduce
While doing a POST operation on /ticketsboard
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{u'__FORM_TOKEN': u'b4df37a949c2a358a7a920d8', u'ticketsboard_changes': u'2667:status=reviewing', u'ticketsboard_submit': u'Save Changes', u'user': u''}
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
System Information
Trac | 1.0.13
|
Agilo | 1.3.15
|
Babel | 0.9.6
|
Docutils | 0.8.1
|
Genshi | 0.6 (with speedups)
|
mod_python | 3.3.1
|
MySQL | server: "5.5.47-0+deb7u1", client: "5.5.47", thread-safe: 1
|
MySQLdb | 1.2.3
|
Pygments | 1.5
|
Python | 2.7.3 (default, Mar 14 2014, 12:14:27) [GCC 4.7.2]
|
pytz | 2012c
|
setuptools | 0.6
|
Subversion | 1.6.17 (r1128011)
|
jQuery | 1.7.2
|
jQuery UI | 1.8.4
|
jQuery Timepicker | 1.0.1
|
Enabled Plugins
binary-agilo | 1.3.15
|
ticketsboardplugin | 1.2.3-trac0.12dev
|
Python Traceback
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.13-py2.7.egg/trac/web/main.py", line 562, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.13-py2.7.egg/trac/web/main.py", line 249, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/lib/python2.7/dist-packages/ticketsboardplugin-1.2.3_trac0.12dev-py2.7.egg/ticketsboardplugin/web_ui.py", line 204, in process_request self.states_actions) File "/usr/local/lib/python2.7/dist-packages/ticketsboardplugin-1.2.3_trac0.12dev-py2.7.egg/ticketsboardplugin/web_ui.py", line 386, in _update_tickets_changes t.save_changes(req.authname) TypeError: save_changes() takes at least 3 arguments (2 given)
comment:5 Changed 7 years ago by
I guess that Agilo has overridden save_changes
, a method that normally has all optional arguments: browser:tags/trac-1.0.3/trac/ticket/model.py@:260#L260. I'll commit a workaround.
comment:6 Changed 7 years ago by
I downloaded the Agilo source:
# OVERRIDE def save_changes(self, author, comment, when=None, db=None, cnum='', replyto=''): """ Store ticket changes in the database. The ticket must already exist in the database. Returns False if there were no changes to save, True otherwise. """
comment:8 Changed 7 years ago by
Hi, thanks it is working now fine.
With the new Parameter for t.save_changes, the ticketboard is able to save the changes. Thanks very much, this will reduce some work at our side.
This defect can be closed.
comment:9 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to Ryan J Ollos:
It appears the code is not doing what it's intended to do though, so a proper fix will be needed to make the plugin fully functional. On the line where the exception is generated, the status is used as a key for the
states_action
dict, however the keys of the dict are actions, not statuses.
=> #13093.
Adding Attachments is not avaible - therefore the trac.ini as comment: (IndexError: pop from empty list)
# -*- coding: utf-8 -*-
[agilo-backlogs] bug_backlog.columns = status, story_priority, component, remaining_time, owner, rd_points, sprint bug_backlog.include_planned_items = False bug_backlog.name = Bug Backlog defect.include_planned_items = False defect.name = defect defect_backlog.columns = component, version, owner, priority, sprint defect_backlog.include_planned_items = False defect_backlog.name = Defect Backlog milestone_backlog.columns = estimated_remaining_time, status, milestone, rd_points, sprint, businessvalue, owner, component milestone_backlog.include_planned_items = True milestone_backlog.name = Milestone Backlog product_backlog.columns = businessvalue, roif, story_priority, rd_points|total_story_points, sprint, milestone, owner, component product_backlog.include_planned_items = False product_backlog.name = Product Backlog sprint_backlog.charts = burndown sprint_backlog.columns = remaining_time|total_remaining_time, owner, status, sprint, rd_points, story_priority, component, ticketsboard sprint_backlog.include_planned_items = False sprint_backlog.name = Sprint Backlog
[agilo-general] sprints_can_start_or_end_on_weekends = False
[agilo-links] allow = defect-task, story-task, defect-story, bug-task, bug-story, devdept-story, requirement-story, devdept-requirement, devdept-task bug.calculate = total_remaining_time=sum:get_outgoing.remaining_time bug.task.copy = owner, sprint bug.task.show = owner, remaining_time cache.related = false cache.timeout = 2000 defect.requirement.copy = status, version, owner, sprint, type defect.requirement.show = status, changetime, owner defect.story.copy = drp_resources, priority, sprint defect.story.show = owner, rd_points, sprint defect.task.copy = status, drp_resources, priority, sprint defect.task.show = remaining_time, owner, sprint delete = defect-task, defect-story devdept.requirement.copy = status, story_priority devdept.requirement.show = status, owner devdept.story.copy = status, story_priority devdept.story.show = status, owner devdept.task.copy = status, story_priority devdept.task.show = status, owner requirement.calculate = total_story_points=sum:get_outgoing.rd_points|type=story,mandatory_story_points=sum:get_outgoing.rd_points|type=story|story_priority=Mandatory,roif=div:businessvalue;mandatory_story_points requirement.story.copy = owner requirement.story.show = rd_points, story_priority story.calculate = total_remaining_time=sum:get_outgoing.remaining_time,estimated_remaining_time=mul:rd_points;get_sprint.get_team_metrics.rt_usp_ratio story.task.copy = owner, sprint story.task.show = owner, remaining_time
[agilo-types] bug = ticketsboard, priority, sprint, testcase, qs_note, component, version, sprint bug.alias = Bug defect = ticketsboard, story_priority, qs_note, component, version, sprint defect.alias = Defect devdept = story_priority devdept.alias = Debt requirement = reporter, businessvalue, milestone, keywords requirement.alias = Requirement story = ticketsboard, story_priority, keywords, rd_points, sprint, testcase, qs_note, component, version, sprint story.alias = User Story task = owner, sprint, remaining_time, drp_resources, ticketsboard, reviewer task.alias = Task
[attachment] max_size = 262144 render_unsafe_content = false
[browser] color_scale = True downloadable_paths = /trunk, /branches/*, /tags/* hide_properties = svk:merge intermediate_color = intermediate_point = newest_color = (255, 136, 136) oldest_color = (136, 136, 255) oneliner_properties = trac:summary render_unsafe_content = false wiki_properties = trac:description
[changeset] max_diff_bytes = 10000000 max_diff_files = 0 wiki_format_messages = true
[components] agilo.* = enabled agilo_common.* = enabled agilopro.* = enabled ticketsboardplugin.assignreviewer.assignrevieweroperation = enabled ticketsboardplugin.web_ui.ticketsboardpage = enabled trac.ticket.api.ticketsystem = disabled trac.ticket.roadmap.roadmapmodule = disabled trac.ticket.web_ui.ticketmodule = disabled tracopt.ticket.commit_updater.committicketupdater = enabled tracopt.versioncontrol.svn.svn_fs.subversionconnector = enabled tracopt.versioncontrol.svn.svn_prop.subversionmergepropertydiffrenderer = enabled tracopt.versioncontrol.svn.svn_prop.subversionmergepropertyrenderer = enabled tracopt.versioncontrol.svn.svn_prop.subversionpropertyrenderer = enabled
[header_logo] alt = (please configure the [header_logo] section in trac.ini) height = -1 link = src = /logo.gif width = -1
[inherit] plugins_dir = templates_dir = /usr/local/lib/python2.7/dist-packages/binary_agilo-1.3.15-py2.7.egg/agilo/templates
[logging] log_file = trac.log log_level = DEBUG log_type = none
[milestone] stats_provider = DefaultTicketGroupStatsProvider
[mimeviewer] enscript_modes = text/x-dylan:dylan:4 enscript_path = enscript max_preview_size = 262144 mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb php_path = php pygments_default_style = trac pygments_modes = tab_width = 8
[notification] admit_domains = always_notify_owner = false always_notify_reporter = false always_notify_updater = true ignore_domains = mime_encoding = base64 smtp_always_bcc = smtp_always_cc = smtp_default_domain = smtp_enabled = false smtp_from = trac@localhost smtp_from_name = smtp_password = smtp_port = 25 smtp_replyto = trac@localhost smtp_server = localhost smtp_subject_prefix = default smtp_user = ticket_subject_template = $prefix #$ticket.id: $summary use_public_cc = false use_short_addr = false use_tls = false
[project] admin = descr = My example project footer = Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a> icon = common/trac.ico name = _vow url =
[query] default_anonymous_query = status!=closed&cc~=$USER default_query = status!=closed&owner=$USER items_per_page = 100
[report] items_per_page = 100 items_per_page_rss = 0
[revisionlog] default_log_limit = 100
[roadmap] stats_provider = DefaultTicketGroupStatsProvider
[search] min_query_length = 3
[svn] branches = trunk,branches/* tags = tags/*
[ticket] default_cc = default_component = default_description = default_keywords = default_milestone = default_owner = default_priority = major default_resolution = fixed default_severity = default_summary = default_type = defect default_version = max_description_size = 262144 preserve_newlines = default restrict_owner = false workflow = ConfigurableTicketWorkflow
[ticket-custom] businessvalue = select businessvalue.label = Business Value businessvalue.optional = True businessvalue.options = 100|200|300|500|800|1200|2000|3000 businessvalue.order = 0 drp_resources = text drp_resources.format = plain drp_resources.label = Resources drp_resources.order = 1 i_links = text i_links.format = plain i_links.label = Referenced By i_links.order = 2 o_links = text o_links.format = plain o_links.label = References o_links.order = 3 qs_note = select qs_note.label = QS Status qs_note.options = Nicht getestet|Geprüft|Fehlerhaft qs_note.order = 9 qs_note.value = Nicht getestet rd_points = select rd_points.label = Story Points rd_points.optional = True rd_points.options = 0|1|2|3|5|8|13|20|40|100 rd_points.order = 4 remaining_time = text remaining_time.format = plain remaining_time.label = Remaining Time remaining_time.order = 5 reviewer = text reviewer.label = Reviewer sprint = select sprint.custom = True sprint.label = Sprint sprint.optional = True sprint.options = 1.0.0 First Release|1.0.1 Zweiter Release|Sammler|1.0.2 UI Aenderungen|1.0.3 Weitere UI Aenderungen|1.0.4 Vierter Release|Linked Fields Support|1.1.0 Zusätzliche Konsolenanwendungen|3.1.1 First Sprint (Erweiterung Anlageprozess)|1.1.0 ESEL - Erster Sprint|1.3.0 Q-Projekt Erster Entwurf|1.3.1 Q-Projekt Zweiter Entwurf|1.3.2 Q-Projekt, dritter Sprint|1.3.3 Q-Projekt, Bugfix|1.3.4 Neue Features für Volkswagen|1.3.5 Anpassen der Listenwerte|1.3.6 Vor Weihnachten 2012|1.3.7 Abschluss im neuen Jahr|1.3.8 Neues QS Template einarbeiten|1.3.9 Q-Template Fix|1.1.0 Audit Trail Funktionserweiterung|2.0.0 Konvertierung auf 64 Bit|2._ Backlogsprint for 64 Nutzungsbedingunen 64Bit|2.0.1 Konvertierung auf 64 Bit|1.0.0 SSO für 64Bit|2.0.0 Rechtevererbung 64 Bit|2.0.0 eRoom-Standardeinladungstexte (ESEL) 64 Bit|2.0.0 LDAP-Synchronisation für 64 Bit|2.0.0 Q-Projekt 64 Bit|4.0.0 Koordinatorenskript und Actionanpassung|2.0.0 LDAP-Synchronisation Actionanpassung|4.0.1 VW yPak|2.0.2 Bugfix Nutzungsbedingungen|2.0.1 Rechtevererbung 64 Bit Bugfix|4.0.2 Bugfix ModuleConfig|4.0.3 Neue eMailtemplates für Sonderzeichen|4.0.4 LDAP ggf. Raum Anlage Action|4.0.5 Bugfixing|2.0.3 Bugfix Webseal|1.0.0 VWANAL Erste Version|1.0.1 VWANAL Abschluss|1.1.0 Änderungen|1.1.1 Bugfixing|4.0.6 Neues Feld für Room Analyzer und mehr|1.0.0 VW Spezifische Werte|1.0.1 Erste Sprint 2016|1.0.2 Bugfixing|1.1.2 Zweiter Analyse Sprint|1.0.2 Fix Spezifische Werte|4.1 Change DLLs for PXC 4.0|2.1.0 Q-Projekt Fixen des Datentyps|1.0.2 VWANAL Bugfixing|1.1.0 VWANALYSE Bugfixing|1.1.1 VWANALYSE Bugfixing Teil 2|4.10.1 Dateien ab Stichtag (4.60.0)|4.60.2 Konfiguration und Emails sprint.order = 6 story_priority = select story_priority.label = Importance story_priority.optional = True story_priority.options = Mandatory|Linear|Exciter story_priority.order = 8 testcase = textarea testcase.cols = 90 testcase.format = plain testcase.height = 3 testcase.label = Testcase testcase.order = 7 testcase.width = 3 ticketsboard = text ticketsboard.label = On Ticketsboard ticketsboard.order = 0
[ticket-workflow] close = reviewing -> closed close.operations = set_resolution close.permissions = TICKET_MODIFY develop = new,reviewing -> processing develop.operations = set_owner_to_self develop.permissions = TICKET_MODIFY finish = testing -> finished finish.operations = leave_status finish.permissions = TICKET_MODIFY leave = * -> * leave.default = 1 leave.operations = leave_status revert = processing,testing,closed,reviewing,finished -> new revert.operations = del_owner revert.permissions = TICKET_MODIFY review = processing -> reviewing review.operations = set_owner_to_self,set_reviewer review.permissions = TICKET_MODIFY test = new -> testing test.operations = set_owner_to_self test.permissions = TICKET_MODIFY
[ticketsboard] fields = owner,priority,remaining_time statuses = new,processing,reviewing,closed
[timeline] abbreviated_messages = true changeset_collapse_events = false changeset_long_messages = false changeset_show_files = 0 default_daysback = 30 max_daysback = 90 newticket_formatter = oneliner ticket_show_details = false
[trac] authz_file = authz_module_name = auto_reload = False base_url = check_auth_ip = true database = mysql://trac:svn@localhost:3306/tracVOW default_charset = iso-8859-15 default_date_format = iso8601 default_handler = WikiModule default_timezone = htdocs_location = ignore_auth_case = false mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search metanav = login,logout,prefs,help,about permission_policies = AgiloPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy permission_store = DefaultPermissionStore repository_dir = /var/svn/repos/vow repository_type = svn show_email_addresses = false timeout = 20 use_base_url_for_redirect = False
[wiki] ignore_missing_pages = false render_unsafe_content = false split_page_names = false