stable

Clone or download

Read-only

story #9027 Create plugin teamforge_compat_tracker

It allows to import references pointing to trackers (trackerXXX) or artifacts (artfXXXX). How to test: * clear tuleap cache * install & activate teamforge_compat_tracker plugin * try to import the following project <?xml version="1.0" encoding="UTF-8"?> <project unix-name="toto57" full-name="Toto 123" description="123 Soleil" access="public"> <long-description> Test description </long-description> <services> <service shortname="svn" enabled="false" /> <service shortname="cvs" enabled="false" /> <service shortname="plugin_git" enabled="false" /> <service shortname="plugin_tracker" enabled="true" /> </services> <ugroups> <ugroup name="project_members" description=""> <members> <member format="username">adrien</member> </members> </ugroup> <ugroup name="proftpd_readers" description=""> <members> <member format="ldap">102</member> </members> </ugroup> <ugroup name="proftpd_writers" description=""> <members> <member format="ldap">102</member> </members> </ugroup> <ugroup name="Contributors" description=""> <members> <member format="ldap">126</member> <member format="username">adrien</member> </members> </ugroup> <ugroup name="Integrators" description=""> <members> <member format="ldap">102</member> </members> </ugroup> <ugroup name="Developers" description=""> <members> <member format="ldap">140</member> </members> </ugroup> </ugroups> <trackers> <tracker id="T239" parent_id="0" instantiate_for_new_projects="1"> <name><![CDATA[Simple Tracker]]></name> <item_name>simple</item_name> <description><![CDATA[simple tracker example]]></description> <color>inca_silver</color> <cannedResponses/> <formElements> <formElement type="aid" ID="F6683" rank="3"> <name>id</name> <label><![CDATA[Id]]></label> </formElement> <formElement type="subby" ID="F6684" rank="4"> <name>submitted_by</name> <label><![CDATA[Submitted by]]></label> </formElement> <formElement type="string" ID="F6677" rank="5"> <name>title</name> <label><![CDATA[Title]]></label> <properties size="30"/> </formElement> <formElement type="text" ID="F6678" rank="11892"> <name>description</name> <label><![CDATA[Description]]></label> <properties rows="10" cols="50"/> </formElement> <formElement type="art_link" ID="F7777" rank="11893"> <name>artifactlink</name> <label><![CDATA[Artifact link]]></label> <properties rows="10" cols="50"/> </formElement> <formElement type="column" ID="F6681" rank="11893"> <name>c1</name> <label><![CDATA[C1]]></label> <formElements> <formElement type="msb" ID="F6679" rank="0"> <name>product</name> <label><![CDATA[Product]]></label> <properties size="7"/> <bind type="static" is_rank_alpha="0"> <items> <item ID="V7675" label="UI" is_hidden="0"/> <item ID="V7676" label="Database" is_hidden="0"/> <item ID="V7677" label="API" is_hidden="0"/> </items> </bind> </formElement> </formElements> </formElement> <formElement type="column" ID="F6682" rank="11894"> <name>c2</name> <label><![CDATA[C2]]></label> <formElements> <formElement type="sb" ID="F6680" rank="0"> <name>status</name> <label><![CDATA[Status]]></label> <bind type="static" is_rank_alpha="0"> <items> <item ID="V7678" label="New" is_hidden="0"/> <item ID="V7679" label="Under analysis" is_hidden="0"/> <item ID="V7680" label="Under verification" is_hidden="0"/> <item ID="V7681" label="Done" is_hidden="0"/> </items> </bind> </formElement> </formElements> </formElement> </formElements> <semantics> <semantic type="title"> <shortname>title</shortname> <label>Title</label> <description>Define the title of an artifact</description> <field REF="F6677"/> </semantic> <semantic type="status"> <shortname>status</shortname> <label>Status</label> <description>Define the status of an artifact</description> <field REF="F6680"/> <open_values> <open_value REF="V7678"/> <open_value REF="V7679"/> <open_value REF="V7680"/> </open_values> </semantic> <semantic type="tooltip"/> <semantic type="plugin_cardwall_card_fields"/> </semantics> <rules> <date_rules/> <list_rules/> </rules> <reports> <report is_default="0"> <name>Default</name> <description>The system default artifact report</description> <criterias> <criteria rank="0"> <field REF="F6680"/> </criteria> </criterias> <renderers> <renderer type="table" rank="0" chunksz="15"> <name>Results</name> <columns> <field REF="F6683"/> <field REF="F6677"/> <field REF="F6680"/> <field REF="F6679"/> </columns> </renderer> </renderers> </report> </reports> <workflow/> <permissions> <permission scope="tracker" ugroup="Contributors" type="PLUGIN_TRACKER_ACCESS_FULL"/> <permission scope="tracker" ugroup="Contributors" type="PLUGIN_TRACKER_ADMIN"/> <permission scope="field" REF="F6683" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6684" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6677" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6677" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_SUBMIT"/> <permission scope="field" REF="F6677" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_UPDATE"/> <permission scope="field" REF="F6678" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6678" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_SUBMIT"/> <permission scope="field" REF="F6678" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_UPDATE"/> <permission scope="field" REF="F6679" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6679" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_SUBMIT"/> <permission scope="field" REF="F6679" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_UPDATE"/> <permission scope="field" REF="F6680" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_READ"/> <permission scope="field" REF="F6680" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_SUBMIT"/> <permission scope="field" REF="F6680" ugroup="Integrators" type="PLUGIN_TRACKER_FIELD_UPDATE"/> <permission REF="F6680" scope="field" type="PLUGIN_TRACKER_FIELD_READ" ugroup="project_members"/> <permission REF="F6680" scope="field" type="PLUGIN_TRACKER_FIELD_UPDATE" ugroup="project_members"/> </permissions> <artifacts> <artifact id="445"> <changeset> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T09:05:19+01:00</submitted_on> <comments/> <field_change field_name="title" type="string"> <value><![CDATA[A demo bug]]></value> </field_change> <field_change field_name="description" type="text"> <value format="text"><![CDATA[With some content]]></value> </field_change> <field_change field_name="product" type="list" bind="static"> <value format="id">7675</value> </field_change> <field_change field_name="status" type="list" bind="static"> <value format="id">7678</value> </field_change> </changeset> <changeset> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T09:05:46+01:00</submitted_on> <comments> <comment> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T09:05:46+01:00</submitted_on> <body format="text"><![CDATA[Some work done]]></body> </comment> </comments> <field_change field_name="status" type="list" bind="static"> <value format="id">7680</value> </field_change> </changeset> </artifact> <artifact id="446"> <changeset> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T19:05:19+01:00</submitted_on> <comments/> <field_change field_name="title" type="string"> <value><![CDATA[A demo bug 2]]></value> </field_change> <field_change field_name="description" type="text"> <value format="text"><![CDATA[With some content 2]]></value> </field_change> <field_change field_name="product" type="list" bind="static"> <value format="id">7675</value> </field_change> <field_change field_name="status" type="list" bind="static"> <value format="id">7678</value> </field_change> </changeset> <changeset> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T19:05:46+01:00</submitted_on> <comments> <comment> <submitted_by format="username">adrien</submitted_by> <submitted_on format="ISO8601">2015-11-10T09:05:46+01:00</submitted_on> <body format="text"><![CDATA[Some work done]]></body> </comment> </comments> <field_change field_name="status" type="list" bind="static"> <value format="id">7680</value> </field_change> <field_change field_name="artifactlink" type="art_link"> <value>445</value> </field_change> </changeset> </artifact> </artifacts> </tracker> <references> <reference source="artf111" target="446"/> <reference source="artf112" target="1337"/> <reference source="tracker111" target="T239"/> <reference source="tracker112" target="T223838"/> </references> </trackers> </project> * you should be able to see xrefs on artf111 and tracker111 Change-Id: I76c01c0e9df4786aa17ee483378ffae22dc64208

Modified Files

Name
A plugins/teamforge_compat_tracker/ChangeLog +2 −0 Go to diff View file
A plugins/teamforge_compat_tracker/README.mkd +5 −0 Go to diff View file
A plugins/teamforge_compat_tracker/VERSION +1 −0 Go to diff View file
A plugins/teamforge_compat_tracker/db/install.sql +9 −0 Go to diff View file
A plugins/teamforge_compat_tracker/db/uninstall.sql +4 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/Plugin/PluginDescriptor.php +36 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/Plugin/PluginInfo.php +32 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/Reference/ArtifactReference.php +54 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/Reference/TrackerReference.php +53 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/ReferencesImporter.class.php +90 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/TeamforgeCompatDao.class.php +51 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/TeamforgeCompatTracker/TeamforgeReferencesBuilder.class.php +134 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/autoload.php +25 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/constants.php +21 −0 Go to diff View file
A plugins/teamforge_compat_tracker/include/teamforge_compat_trackerPlugin.class.php +110 −0 Go to diff View file
A plugins/teamforge_compat_tracker/site-content/en_US/teamforge_compat_tracker.tab +2 −0 Go to diff View file
A plugins/teamforge_compat_tracker/site-content/fr_FR/teamforge_compat_tracker.tab +2 −0 Go to diff View file
A plugins/teamforge_compat_tracker/tests/TeamforgeReferencesImporterTest.php +82 −0 Go to diff View file
A plugins/teamforge_compat_tracker/tests/bootstrap.php +22 −0 Go to diff View file
A plugins/teamforge_compat_tracker/www/index.php +23 −0 Go to diff View file
M plugins/tracker/include/Tracker/XML/Importer/ArtifactImportedMapping.php +4 −0 Go to diff View file
M plugins/tracker/include/TrackerXmlImport.class.php +12 −0 Go to diff View file
M plugins/tracker/www/resources/tracker-definition.rnc +9 −1 Go to diff View file
M plugins/tracker/www/resources/tracker-definition.rng +16 −0 Go to diff View file
M src/common/xml/resources/project/tracker-definition.rng +16 −0 Go to diff View file
M tools/rpm/Makefile +2 −0 Go to diff View file
M tools/rpm/tuleap.rhel6.spec +2 −0 Go to diff View file
M tools/rpm/tuleap.spec +2 −0 Go to diff View file