From: Tim L. <guy...@gm...> - 2011-12-04 16:45:51
|
On 4 Dec 2011, at 07:49, jerome wrote: > Hi Tim. > > > What should be the citation if the *new* source is an individual? > ie. we cannot attach/add/create a source like this on an object > (person, family, event, attribute, address, lds, etc, ...) without a > citation! There is a small mistake in editcitation which prevents the saving of an empty citation. This is noted in the known issues, and also there s a FIXME in the code. I will fix this as soon as I have completed the merge into trunk, but I want to make sure that the merge is the one that has been tested. > Is it not possible to create the citation (id) *and* the source (id) > together into source citation editor? The citation editor always deals with both a source and a citation, creating them if they do not exist. There always has to be a citation, even if it is empty, just as there always had to be a SourceRef. > Otherwise, maybe a cosmetic issue on this editor: there is no focus > on a field! To make/set the most important fields as default could > be useful for edition. ie. seizure without using the mouse for > focusing. > See: http://www.gramps-project.org/bugs/view.php?id=5351 Yes, will fix that too. > > > Regards. > Jérôme > > --- En date de : Ven 2.12.11, Tim Lyons <guy...@gm...> a > écrit : > >> De: Tim Lyons <guy...@gm...> >> Objet: [Gramps-devel] GEPS023 with no data in the citation >> À: "Gramps Development List" <gra...@li...> >> Date: Vendredi 2 décembre 2011, 19h04 >> On 29 Nov 2011, at 06:53, Jérôme >> wrote: >> >> >> Jérôme, >> >> I think you are suggesting some convenience functions that >> would deal >> with the situation where a citation was empty. I had not >> included such >> functions, for several reasons: >> >> (1) There are probably not that many situations where there >> is no >> opportunity to have data in a citation. True, this might >> apply to >> GeneWeb, and it certainly applies to CSV, but I think that >> in most >> other cases there is at least the possibility to have >> information in >> the citation. >> >> (2) I tend to think that convenience functions that hide >> part of the >> functionality can make maintenance more complicated rather >> than >> simpler. You need to check what the convenience function is >> actually >> doing, and then check what the underlying code is doing. Of >> course, if >> that function is used a lot, then it may make things >> simpler, but if >> it is very little used, and only replaces a small amount of >> code, it >> may be more trouble than it is worth. >> >> (3) It is not obvious how the functions should work. If >> there are >> already citations attached to the object, how should these >> be treated? >> etc. Maybe one of them already points to the source, with >> or without >> data on the citation. I suggest that it is possible that >> one would >> want to control the processing in such cases. >> >> (4) The code is not very much changed from the existing >> code. The >> Citation primary object corresponds pretty closely to the >> SourceRef >> secondary object. You create the object, and >> set_reference_handle() to >> point to the Source object. There is a difference that you >> than have >> to do a db.add_citation(citation, transaction). You then do >> an >> obj.add_citation(citation_handle) instead of an >> obj.add_source_reference(sourcerefobj) to add the >> SourceRef/Citation >> to the object. >> >> (5) As far as data access is concerned, you do >> obj.get_citation_list() >> instead of obj.get_source_references() to get a list of >> Citation >> handles/SourceRefs respectively. With the citation, you >> then need to >> do a db.get_citation_from_handle(citation_handle). Having >> got the >> object, you do get_reference_handle() to get the source >> object handle. >> >> (By the way, note that the names of the functions and the >> return >> values are mostly chosen to match the way notes are >> attached to >> objects, so obj.add_citation(citation_handle) corresponds >> with >> add_note, and obj.get_citation_list() corresponds with >> get_note_list() >> - both returning handles). >> >> >> I am glad you appreciate the merits of merging the 'empty' >> citations. >> The possibility to merge citations is an important benefit >> of the >> change. >> >> >> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT >> infrastructure >> contains a definitive record of customers, application >> performance, >> security threats, fraudulent activity, and more. Splunk >> takes this >> data and makes sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-novd2d >> _______________________________________________ >> Gramps-devel mailing list >> Gra...@li... >> https://lists.sourceforge.net/lists/listinfo/gramps-devel >> |