Skip to content

Commit

Permalink
add: CustomField-Tracker-Relations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Krzyzak committed Nov 26, 2010
1 parent 2c49204 commit c7d577e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/views/mylyn_connector/trackers/all.xml.builder
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ xml.trackers :xmlns => 'http://redmin-mylyncon.sf.net/api', :api=>api_version do
xml.tracker :id => tracker.id do xml.tracker :id => tracker.id do
xml.name tracker.name xml.name tracker.name
xml.position tracker.position xml.position tracker.position
xml.issueCustomFields integer_list(tracker.custom_fields)
end end
end end
end end
3 changes: 2 additions & 1 deletion test/functional/trackers_controller_test.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'


class MylynConnector::TrackersControllerTest < MylynConnector::ControllerTest class MylynConnector::TrackersControllerTest < MylynConnector::ControllerTest
fixtures :trackers fixtures :trackers, :custom_fields, :custom_fields_trackers


def setup def setup
super super
Expand All @@ -22,6 +22,7 @@ def test_all
tr = {:tag => 'tracker', :attributes => {:id => 3}, :parent => trs} tr = {:tag => 'tracker', :attributes => {:id => 3}, :parent => trs}
assert_tag :tag => 'name', :content => 'Support request', :parent => tr assert_tag :tag => 'name', :content => 'Support request', :parent => tr
assert_tag :tag => 'position', :content => '3', :parent => tr assert_tag :tag => 'position', :content => '3', :parent => tr
assert_tag :tag => 'issuecustomfields', :content=> '2 6', :parent => tr


end end


Expand Down
7 changes: 6 additions & 1 deletion test/schema/types/tracker.xsd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
elementFormDefault="qualified" > elementFormDefault="qualified" >


<xsd:include schemaLocation="property.xsd" /> <xsd:include schemaLocation="property.xsd" />
<xsd:include schemaLocation="idList.xsd" />


<xsd:complexType name="tracker"> <xsd:complexType name="tracker">
<xsd:complexContent> <xsd:complexContent>
<xsd:extension base="tns:sortedProperty" /> <xsd:extension base="tns:sortedProperty">
<xsd:sequence>
<xsd:element name="issueCustomFields" type="tns:idList"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent> </xsd:complexContent>
</xsd:complexType> </xsd:complexType>


Expand Down

0 comments on commit c7d577e

Please sign in to comment.