package com.perforce.polarion.element.field; import java.util.HashMap; import java.util.Map; import java.util.Set; public class FieldMapping { private static FieldMapping instance = new FieldMapping(); private Map<WorkItemField, P4JobField> toJob = new HashMap<>(); private Map<P4JobField, WorkItemField> fromJob = new HashMap<>(); private FieldMapping() { // Default values (depending on UX remove these entries) add(WorkItemField.ID, new P4JobField("Job")); add(WorkItemField.DESCRIPTION, new P4JobField("Description")); add(WorkItemField.STATUS, new P4JobField("PolarionStatus")); add(WorkItemField.AUTHOR, new P4JobField("ReportedBy")); add(WorkItemField.TITLE, new P4JobField("PolarionTitle")); add(WorkItemField.PROJECT, new P4JobField("PolarionProject")); add(WorkItemField.LINK, new P4JobField("PolarionLink")); } public static FieldMapping getInstance() { return instance; } public P4JobField get(WorkItemField field) { if (toJob.containsKey(field)) { return toJob.get(field); } else { return null; } } public WorkItemField get(P4JobField field) { if (fromJob.containsKey(field)) { return fromJob.get(field); } else { return null; } } public void add(WorkItemField field, P4JobField jobField) { toJob.put(field, jobField); fromJob.put(jobField, field); } public Set<WorkItemField> listWorkItemFields() { return toJob.keySet(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 23310 | Nathan Fiedler | "Forking branch Main of perforce_software-p4polarion to nathan_fiedler-p4polarion." | ||
//guest/perforce_software/p4polarion/main/src/com/perforce/polarion/element/field/FieldMapping.java | |||||
#6 | 18792 | Paul Allen | Move Polarion Status to a 'PolarionStatus' in the Perforce Job. | ||
#5 | 18028 | Paul Allen |
Polarion WorkItem link for Swarm. Uses Perforce counter 'Polarion.Server.Url' for the Polarion Server e.g. http://phooey-win.das.perforce.com |
||
#4 | 17346 | Paul Allen | Store 'Description' from Polarion as-is (not with the 'text/plain' tag line). | ||
#3 | 17343 | Paul Allen |
Delete protection (when importing jobs only delete if sucessfull) Remove 'User' and use 'ReportedBy' Job Field. |
||
#2 | 17338 | Paul Allen | Job scanner - looks for changes to Perforce Jobs and updates the linked WorkItems. | ||
#1 | 16771 | Paul Allen |
Added Perforce JOB Create/Update/Delete support. Updated p4java to 15.1 |