@Test public void testFindTask() throws Exception { RestInvocations.loadMetadata(handler, "defect"); RestInvocations.loadMetadata(handler, "release-backlog-item"); handler.addRequest("GET", "/qcbin/rest/domains/domain/projects/project/defects?fields=actual-fix-time,attachment,in-bucket,changeset,build-closed,closing-version,closing-date,dev-comments,id,status,description,detected-by,build-detected,detected-in-rcyc,detected-in-rel,detection-version,creation-time,estimated-fix-time,extended-reference,fixed-on-date,has-change,has-linkage,has-others-linkage,last-modified,planned-closing-ver,priority,user-04,user-03,reproducible,severity,subject,name,user-02,user-01,watch-id,release-backlog-item.product-id,release-backlog-item.owner,release-backlog-item.blocked,release-backlog-item.entity-name,release-backlog-item.entity-type,release-backlog-item.feature-id,release-backlog-item.invested,release-backlog-item.kanban-status-id,release-backlog-item.linked-entities-info,release-backlog-item.no-of-sons,release-backlog-item.kanban-parent-status-id,release-backlog-item.rank,release-backlog-item.release-id,release-backlog-item.entity-id,release-backlog-item.remaining,release-backlog-item.sprint-id,release-backlog-item.status,release-backlog-item.kan-parent-duration,release-backlog-item.story-points,release-backlog-item.kan-status-duration,release-backlog-item.team-id,release-backlog-item.theme-id,release-backlog-item.estimated,release-backlog-item.watch-id,release-backlog-item.id,product-group-id&query={id[86]}&order-by={}", 200) .content("entityServiceTest_entity.xml"); HpAlmRepository repository = new HpAlmRepository(getProject().getName(), 1); repository._assignProject(); Task task = repository.findTask("defect #86"); checkTask(task); }
public Task findTask(String taskName) throws Exception { if(!_assignProject()) { return null; } Entity entity = project.getComponent(EntityService.class).getEntity(new EntityRef(taskName)); return new HpAlmTask(project, entity); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task findTask(String taskName) throws Exception { if(!_assignProject()) { return null; } Entity entity = project.getComponent(EntityService.class).getEntity(new EntityRef(taskName)); return new HpAlmTask(project, entity); } }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task findTask(String taskName) throws Exception { if(!_assignProject()) { return null; } Entity entity = project.getComponent(EntityService.class).getEntity(new EntityRef(taskName)); return new HpAlmTask(project, entity); } HpAlmRepository();  HpAlmRepository(String url, long id); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task findTask(String taskName) throws Exception { if(!_assignProject()) { return null; } Entity entity = project.getComponent(EntityService.class).getEntity(new EntityRef(taskName)); return new HpAlmTask(project, entity); } HpAlmRepository();  HpAlmRepository(String url, long id); void setId(long id); @Tag("defect") TaskConfig getDefect(); void setDefect(TaskConfig defect); @Tag("requirement") TaskConfig getRequirement(); void setRequirement(TaskConfig requirement); @Attribute("id") long getId(); String getPresentableName(); boolean isConfigured(); Task[] getIssues(String query, int max, long since); @Override void setPreferredOpenTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredOpenTaskState(); @Override void setPreferredCloseTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredCloseTaskState(); Task findTask(String taskName); String extractId(String taskName); HpAlmRepository clone(); boolean equals(Object o); int hashCode(); int compareTo(HpAlmRepository other); }
HpAlmRepository extends TaskRepository implements Comparable<HpAlmRepository> { public Task findTask(String taskName) throws Exception { if(!_assignProject()) { return null; } Entity entity = project.getComponent(EntityService.class).getEntity(new EntityRef(taskName)); return new HpAlmTask(project, entity); } HpAlmRepository();  HpAlmRepository(String url, long id); void setId(long id); @Tag("defect") TaskConfig getDefect(); void setDefect(TaskConfig defect); @Tag("requirement") TaskConfig getRequirement(); void setRequirement(TaskConfig requirement); @Attribute("id") long getId(); String getPresentableName(); boolean isConfigured(); Task[] getIssues(String query, int max, long since); @Override void setPreferredOpenTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredOpenTaskState(); @Override void setPreferredCloseTaskState(@Nullable CustomTaskState customTaskState); @Nullable @Override CustomTaskState getPreferredCloseTaskState(); Task findTask(String taskName); String extractId(String taskName); HpAlmRepository clone(); boolean equals(Object o); int hashCode(); int compareTo(HpAlmRepository other);  }