Mercurial > libervia-web
changeset 1194:bed008b65d7c
pages (merge-requests/edit, tickets/edit, tickets/new): use serialised extra following backend change + fixed use of "update" when editing ticket:
"update" was not set in extra, as a result some metadata could be lost on update (author, comments_uri).
fix 301
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 14 Jun 2019 12:50:59 +0200 |
parents | aee3d8fa679f |
children | 5e67c2564779 |
files | libervia/pages/merge-requests/edit/page_meta.py libervia/pages/tickets/edit/page_meta.py libervia/pages/tickets/new/page_meta.py |
diffstat | 3 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/pages/merge-requests/edit/page_meta.py Wed Jun 12 20:05:45 2019 +0200 +++ b/libervia/pages/merge-requests/edit/page_meta.py Fri Jun 14 12:50:59 2019 +0200 @@ -5,6 +5,7 @@ from sat.core.i18n import _ from twisted.internet import defer from sat.tools.common import template_xmlui +from sat.tools.common import data_format from sat.core.log import getLogger """merge-requests edition""" @@ -102,6 +103,7 @@ posted_data[u'body'] = [u'<div xmlns="{ns}">{body}</div>'.format(ns=C.NS_XHTML, body=body)] + extra = {u'update': True} yield self.host.bridgeCall( "mergeRequestSet", service.full(), @@ -111,7 +113,7 @@ posted_data, u"", ticket_id, - {"update": C.BOOL_TRUE}, + data_format.serialise(extra), profile, ) # we don't want to redirect to edit page on success, but to tickets list
--- a/libervia/pages/tickets/edit/page_meta.py Wed Jun 12 20:05:45 2019 +0200 +++ b/libervia/pages/tickets/edit/page_meta.py Fri Jun 14 12:50:59 2019 +0200 @@ -5,6 +5,7 @@ from sat.core.i18n import _ from twisted.internet import defer from sat.tools.common import template_xmlui +from sat.tools.common import data_format from sat.core.log import getLogger log = getLogger(__name__) @@ -102,8 +103,10 @@ posted_data[u'body'] = [u'<div xmlns="{ns}">{body}</div>'.format(ns=C.NS_XHTML, body=body)] + extra = {u'update': True} yield self.host.bridgeCall( - "ticketSet", service.full(), node, posted_data, u"", ticket_id, {}, profile + "ticketSet", service.full(), node, posted_data, u"", ticket_id, + data_format.serialise(extra), profile ) # we don't want to redirect to edit page on success, but to tickets list data["post_redirect_page"] = (
--- a/libervia/pages/tickets/new/page_meta.py Wed Jun 12 20:05:45 2019 +0200 +++ b/libervia/pages/tickets/new/page_meta.py Fri Jun 14 12:50:59 2019 +0200 @@ -74,7 +74,7 @@ yield self.host.bridgeCall( - "ticketSet", service.full(), node, posted_data, u"", u"", {}, profile + "ticketSet", service.full(), node, posted_data, u"", u"", u"", profile ) # we don't want to redirect to creation page on success, but to tickets list data["post_redirect_page"] = (