On Fri, Jan 10, 2014 at 1:11 PM, LYNCH, MICHAEL <mly...@nuigalway.ie> wrote:
> On the now un-supported version 1.7, no less!

Hi Michael,

I wouldn't worry _too_ much. That announcement was about security
updates. If you notice a security update for a more recent version,
update then (to 1.8 or 4, whichever you feel up to). You would have to
do practically the same process to update to 1.7.x+1 as to 1.8.y+1, so
it's no big deal.

> select metadatavalue.item_id, SUBSTR(text_value,0,10) ,community.name from 
> metadatavalue, communities2item, community  where metadatavalue.item_id = 
> communities2item.item_id and 
> communities2item.community_id=community.community_id and metadata_field_id = 
> '12' and metadatavalue.item_id in (select item_id from item where in_archive 
> = '1')

Unless your predecessor messed with the metadatafieldregistry table
directly, by default metadata_field_id='12' means dc.date.available.

One problem with the query which will cause it to report a higher
number of items than there actually are is in cases where you edit an
item and it gets two or more metadata values of the field
dc.date.accessioned. Likewise, if that metadata value is removed
somehow, the item won't be counted.

In other words, you're counting number of values of a certain metadata
field and you're expecting to get number of items. That can be most
easily fixed by subqueries - make a list of item_ids first and then
look up values of a metadata field for them (or any other information
like community membership).

> Can anyone suggest a tweak to the SQL query that might give me numbers more 
> in line with what DSpace reports?

Make a list of reports you want to get.

> Or is browsing by Issue Date not a good way to see the total number of items 
> in a collection?

Yes, it is. IIRC, every item in DSpace will have an issued date (and
unless you adda nother value manually, there should be only one).

> I believe the SQL query is looking at dc.date.available, not dc.date.issued, 
> but I wouldn't expect the discrepancy in total numbers that I'm seeing.

Explained above.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to