← Back to team overview

dhis2-devs team mailing list archive

Re: FW: Bug in XML export / import for Program Rules


Many thanks.  :-)

BTW, I reported this via the email forum, as I’m still not sure where to formally report bugs – should we still be using Launchpad, or are you switching over to GitHub?  There seem to be recent issues listed on both sites...  which one will get noticed more quickly?  ;-)

Cheers, Sam.

From: Morten Olav Hansen <morten@xxxxxxxxx>
Date: Friday, 11 November 2016 at 01:42
To: Sam Johnson <samuel.johnson@xxxxxxxxxx>
Cc: DHIS2 Developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Dhis2-devs] FW: Bug in XML export / import for Program Rules

Hm ok, thanks Sam, I will look into it (it should have been encoded automatically)

Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo

On Fri, Nov 11, 2016 at 6:15 AM, Sam Johnson <samuel.johnson@xxxxxxxxxx<mailto:samuel.johnson@xxxxxxxxxx>> wrote:
Hi all,

Using 2.25, revision 221c5d8 (Wed morning), Chrome

I just wanted to report a bug in the XML export / import for Program Rules:

•         When you export XML for a program rule, ‘&&’ operators are kept as plain-text in the XML that is exported.

•         When you re-import this XML, it crashes with the following log:
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '&' (code 38) (expected a name start character)
If converted to character codes (‘&amp; &amp;’) they import fine, so I’m guessing the export routine just needs to be updated to convert them on export.

This is a blocker because the ‘and’ variant doesn’t seem to work for Program Rules (they fail to fire), so you are tied to using ‘&&’ in expressions.

Cheers, Sam.

Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp