Bug 52993

Summary: xmlproperty not working as advertised
Product: Ant Reporter: Ryan <rbrueske>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 1.8.2   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   

Description Ryan 2012-03-27 22:48:18 UTC
Not sure if this is an issue with me understanding the documentation or it not working.

I'm trying to load xml properties from Jira for the sake of configuring an ant build. When I view the xml that I'm having problems with from Jira it looks like:

...
<issuelinks>
	<issuelinktype id="10000">
		<name>Dependency</name>
		<outwardlinks description="depends upon">
			<issuelink>
				<issuekey id="14214">BUILD-460</issuekey>
			</issuelink>
			<issuelink>
				<issuekey id="14182">BUILD-446</issuekey>
			</issuelink>
		</outwardlinks>
		<inwardlinks description="is a dependency of">
			<issuelink>
				<issuekey id="14183">BUILD-447</issuekey>
			</issuelink>
		</inwardlinks>
	</issuelinktype>
	<issuelinktype id="10002">
		<name>Fix</name>
		<outwardlinks description="fixes">
			<issuelink>
				<issuekey id="14215">BUILD-461</issuekey>
			</issuelink>
		</outwardlinks>
	</issuelinktype>
</issuelinks>
...

I expected to be able to output the id as part of the property names so that they don't collapse. But could not get it to work the way I need it to. I get the following properties back from xmlproperty:

[echoproperties] rss.channel.item.issuelinks.issuelinktype.inwardlinks.description=is a dependency of
[echoproperties] rss.channel.item.issuelinks.issuelinktype.inwardlinks.issuelink.issuekey=BUILD-447
[echoproperties] rss.channel.item.issuelinks.issuelinktype.name=Dependency,Fix
[echoproperties] rss.channel.item.issuelinks.issuelinktype.outwardlinks.description=depends upon,fixes
[echoproperties] rss.channel.item.issuelinks.issuelinktype.outwardlinks.issuelink.issuekey=BUILD-460,BUILD-446,BUILD-461

This is problematic because it combines different elements from different parent elements and then I can't parse to determine the Jira issues that have a particular link type (such as depends on).

Am I reading something wrong or isn't the includeSemanticAttribute=true suppose to include the id value in the property name?

Is there any workaround? This is a showstopper for me. Thanks for any and all help.

You can test this with any Jira that provides xml search results.