Issue Details (XML | Word | Printable)

Key: DERBY-4014
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Kathey Marsden
Reporter: Kathey Marsden
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Update Derby Jira Report XML VTI to access more fields

Created: 09/Jan/09 06:44 PM   Updated: 04/May/09 06:22 PM
Component/s: Demos/Scripts
Affects Version/s: 10.5.1.1
Fix Version/s: 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby-4014_diff.txt 2009-01-09 08:00 PM Kathey Marsden 1 kB
Text File Licensed for inclusion in ASF works derby-4014_diff2.txt 2009-01-13 12:38 AM Kathey Marsden 4 kB

Issue & fix info: Patch Available
Resolution Date: 13/Jan/09 04:52 PM


 Description  « Hide
It would be useful for backporting reports and other Jira analysis reports to have the apacheVanillaReport access more of the item fields. Some missing are assignee, version, fix version, resolution,

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kathey Marsden made changes - 09/Jan/09 07:58 PM
Field Original Value New Value
Assignee Kathey Marsden [ kmarsden ]
Kathey Marsden added a comment - 09/Jan/09 08:00 PM
Attached is a patch to add
 "reporter", "assignee", "resolution", "created", "updated", "votes", "version", "fixVersion"

to the VTI

Kathey Marsden made changes - 09/Jan/09 08:00 PM
Attachment derby-4014_diff.txt [ 12397552 ]
Kathey Marsden made changes - 09/Jan/09 08:00 PM
Derby Info [Patch Available]
Rick Hillegas added a comment - 09/Jan/09 08:40 PM
Hi Kathey. Looks good to me. I applied the patch and then ran the demoFileVtis.sql script. One thing I noticed is that the fixVersion elements are all concatenated, so the sample row that is selected by the apacheVanillaReport vti has a fixVersion field which looks like this: "10.2.2.110.3.1.410.4.0.0". You might want to think about how you want to handle that. Here are two suggestions:

1) Write a wrapper function that reformats that field for you. So you would write a query something like this:

select myFormatter( s."fixVersion" )
from table( "apacheVanillaLogFile"( 'file:///opt/DerbyTrunk/java/demo/vtis/data/ApacheServerLog.xml' ) ) s

2) You could also change XmlVTI.parseRow() to do something other than just concatenate identically named child elements. E.g., insert a space between the text contents of those children.



Kathey Marsden added a comment - 09/Jan/09 08:53 PM - edited
Thanks Rick for looking at the patch. I think option 2 sounds better. Do you think a space is most appropriate or would it be better to have a more distinguishable characters like ^ for separation?


Rick Hillegas added a comment - 09/Jan/09 09:49 PM
Hi Kathey. Since you're actively using this vti, I think you should do what makes sense to you. Later on, for extra credit, we could change the XML vtis to take a second argument: the desired separator character. So the user would type a query like this:

select myFormatter( s."fixVersion", ' ' )
from table( "apacheVanillaLogFile"( 'file:///opt/DerbyTrunk/java/demo/vtis/data/ApacheServerLog.xml' ) ) s

Kathey Marsden added a comment - 13/Jan/09 12:38 AM
Attached is an updated patch for this issue. It has the same changes from the initial patch plus it:
- Changes XMLVTI.parseRow to separate multiple occurances of the same tag with spaces.
- Changes derbyBuild/JiraConnector.java to take an optional all parameter to export all the issues. This is a bit out of the scope of this issue but will be useful for taking bug reports with the VTI. I will commit this tomorrow unless there are comments.


Kathey Marsden made changes - 13/Jan/09 12:38 AM
Attachment derby-4014_diff2.txt [ 12397732 ]
Repository Revision Date User Message
ASF #734177 Tue Jan 13 16:47:30 UTC 2009 kmarsden DERBY-4014 Update Derby Jira Report XML VTI to access more fields
- Add more fields to Jira VTI
- Add all option to JiraConnector to get full issue export.
- Change XMLVTI to separate multiple items with spaces.
Files Changed
MODIFY /db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/XmlVTI.java
MODIFY /db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/VTIs.java
MODIFY /db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraConnector.java

Kathey Marsden made changes - 13/Jan/09 04:52 PM
Resolution Fixed [ 1 ]
Fix Version/s 10.5.0.0 [ 12313010 ]
Status Open [ 1 ] Closed [ 6 ]
Myrna van Lunteren made changes - 04/May/09 06:22 PM
Fix Version/s 10.5.0.0 [ 12313010 ]
Fix Version/s 10.5.1.1 [ 12313771 ]
Affects Version/s 10.5.0.0 [ 12313010 ]
Affects Version/s 10.5.1.1 [ 12313771 ]