Shouldn't tags be unique -- i.e., you shouldn't be able to create duplicate tags (same string) on the same object, right? Can we enforce that at the database level?
-Burke On Tue, Apr 3, 2012 at 11:19 AM, Mike Seaton (Commented) (JIRA) < [email protected]> wrote: > Mike > Seaton<https://tickets.openmrs.org/secure/ViewProfile.jspa?name=mseaton>commented > on [image: > New Feature] REPORT-49 <https://tickets.openmrs.org/browse/REPORT-49> > *Add a mechanism for tagging / categorizing reports and other reporting > elements* <https://tickets.openmrs.org/browse/REPORT-49> > > Discussion on IRC between Mike and Darius led to the following design for > how to implement tags: > > New Table: > > reporting_definition_tag ( > id integer primary key, > uuid char(38) not null, > definition_uuid char(38) not null, > tag varchar(100) not null > ) > > New Object: > > DefinitionTag extends BaseOpenmrsObject { > Integer id; > String definitionUuid; > Class<? extends Definition> definitionType; > String tag; > } > > Changes to Services: > > - Change implementation of > BaseDefinitionService.getDefinitionsByTag(String tagName) to use these new > tags (the previous implementation just returned all definitions that had > the passed tagName in the definition name). > > > - Add new Service methods on BaseDefinitionService (will be inherited > by all other DefinitionServices): > > List<DefinitionTag> getAllDefinitionTags(); > Map<DefinitionTag, List<T>> getAllDefinitionsByTag(); > > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators<https://tickets.openmrs.org/secure/ContactAdministrators%21default.jspa> > . > For more information on JIRA, see: http://www.atlassian.com/software/jira > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

