Re: [dspace-tech] Need help in database migration from 5x to 6.0

2016-11-10 Thread Terry Brady
Is this issue captured in a Jira ticket?

Should the migration script trap this error or attempt to clean up the
issue?

On Wed, Nov 9, 2016 at 6:17 PM, euler  wrote:

> Dear Helix and Terry,
>
> I am running this dspace instance in a windows environment so I just
> manually run the SQL commands from your script and it worked. Running the
> migrate command though I encountered another error this time from the table
> group2group (Message : ERROR: could not create unique index
> "group2group_pkey" Detail: Key (parent_id, 
> child_id)=(e226cfe7-385e-4547-977e-3de9e16a4b3e,
> a1ef01c6-0420-47de-ba1c-50c695644bcf) is duplicated., so I just run your
> SQL again but this time replacing eperson_group_id and eperson_id by
> parent_id and child_id respectively. Now when I run the migrate command, it
> is successful.
>
> Thank you so much for this!
>
> Best regards,
> euler
>
> On Thursday, November 10, 2016 at 7:49:41 AM UTC+8, helix84 wrote:
>>
>> Same script without mangled newlines:
>>
>> cleanup_eperson.sh:
>>
>> #!/bin/sh
>>
>> total=`psql -A -t -c "SELECT count(1) FROM epersongroup2eperson;"`
>> distinct=`psql -A -t -c "SELECT count(DISTINCT (eperson_group_id,
>> eperson_id)) FROM epersongroup2eperson;"`
>>
>> # for testing only:
>> #total=$(($total+1))
>>
>> echo $total
>> echo $distinct
>>
>> if [ "$total" -gt "$distinct" ] ; then
>>
>> echo "Cleaning up..." | mail -s "digilib eperson table cleanup
>> ($total/$distinct)" dspac...@example.com
>>
>> report=`psql 2>&1 <>   SELECT MIN(ctid) as ctid, eperson_group_id,
>> eperson_id
>> FROM epersongroup2eperson
>> GROUP BY eperson_group_id, eperson_id HAVING
>> COUNT(*) > 1;
>> THE_END`
>>
>> # perform the cleanup
>> # capture the output and running time
>> cleanuptime=`time psql 2>&1 <> DELETE FROM epersongroup2eperson a USING (
>>   SELECT MIN(ctid) as ctid, eperson_group_id,
>> eperson_id
>> FROM epersongroup2eperson
>> GROUP BY eperson_group_id, eperson_id HAVING
>> COUNT(*) > 1
>>   ) b
>> WHERE a.eperson_group_id = b.eperson_group_id
>> AND a.eperson_id = b.eperson_id
>> AND a.ctid <> b.ctid;
>> THE_END`
>>
>> # check again and report the status by email
>> out=`psql <> SELECT count(1) FROM epersongroup2eperson;
>> SELECT count(DISTINCT (eperson_group_id, eperson_id))
>> FROM epersongroup2eperson;
>> THE_END`
>> echo "$report\n\n\n\n$cleanuptime\n\n$out" | mail -s "digilib
>> eperson table cleanup complete" dspac...@example.com
>>
>> echo "email sent: $out"
>>
>> else
>> echo "" | mail -s "digilib eperson table clean"
>> dspac...@example.com
>> fi
>>
>>
>>
>>
>> Regards,
>> ~~helix84
>>
>> Compulsory reading: DSpace Mailing List Etiquette
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>>
>>


-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
http://georgetown-university-libraries.github.io/

425-298-5498 (Seattle, WA)

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Customize Item Usage Statistics page

2016-11-10 Thread Donald Bynum
Thanks Terry,

That definitely sent me in the right direction.

Regards,

Don.

On Wednesday, November 9, 2016 at 3:33:53 PM UTC-5, Terry Brady wrote:

> The following file might help: 
> https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/statistics/StatisticsTransformer.java
>
> On Wed, Nov 9, 2016 at 11:32 AM, Donald Bynum  > wrote:
>
>> I am running DSpace 5.5 with XMLUI and Mirage.  In the Item Usage 
>> Statistics report page, I want to remove the Top country views and Top city 
>> views sections and replace them with a new Caption and a link to an 
>> external URL.  I want to include the item handle as part of the URL string.
>>
>> Sounds easy enough, but how?
>>
>> Regards,
>>
>> Don.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to dspace-tech...@googlegroups.com .
>> To post to this group, send email to dspac...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Terry Brady
> Applications Programmer Analyst
> Georgetown University Library Information Technology
> http://georgetown-university-libraries.github.io/ 
> 
> 425-298-5498 (Seattle, WA)
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] New Dspace 5.5 search not working correctly

2016-11-10 Thread Tom Avino
If I do a search in our new Dspace 5.5 XMLUI for 8NG445, the results are 
returning anything with an '8', or an 'NG, or a '445',  In the past, Dspace 
search would have only returned the exact phrase 8NG445.  We have over 
250,000 items in our database, so this is causing a real problem.  Is there 
a setting I am missing?  Seems like this should not be the default 
behavior.  Is there something I can configure to make this work?  

Thank you 

Tom Avino

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Issues with REST find-by-metadata-field in DSpace 5

2016-11-10 Thread Terry Brady
Alan,

If you are interested in the new REST Query functionality that is a part of
DSpace 6, I have some documentation on how to port that functionality into
DSpace 5.

https://wiki.duraspace.org/display/DSDOC6x/REST+Based+Quality+Control+Reports#RESTBasedQualityControlReports-InstallinginDSpace5

Terry

On Thu, Nov 10, 2016 at 7:26 AM, Alan Orth  wrote:

> Thanks, Ilja.
>
> Now that you mention permissions issues, I have seen some errors
> suggesting that in dspace.log after I do the REST query:
>
> ERROR org.dspace.rest.ItemsResource @ User(anonymous) has not permission
> to read item!
>
> But it's weird that in my case I see MORE items in the REST results than
> are actually in the database! Does REST query the database directly, or is
> there some cache somewhere I can clear, an index I can update, etc?
>
> Looking forward to getting our stack to DSpace 6, but it won't be until
> mid 2017 at this rate. :(
>
> Cheers,
>
> On Thu, Nov 10, 2016 at 3:01 PM Ilja Sidoroff 
> wrote:
>
>> Hi,
>>
>> I tried to do something similar (all items with something in the field
>> X), but it seems that find-by-metadata-field does not support wildcards,
>> only exact matches. Helix84 suggested SOLR for me, There's also a new REST
>> api for reports in 6.0 (Terry Brady suggested that to me). You can probably
>> find the threads with my name & those mentioned.
>>
>> For the other question, are there differences in the item access
>> permissions and/or if any of the items are in the workflow or in the
>> collections. I think the SQL queries will give you all the items, but I
>> think there is some filtering done with the REST - didn't look very deeply
>> into that, though.
>>
>> Ilja
>>
>> 
>> From: dspace-tech@googlegroups.com  on
>> behalf of Alan Orth 
>> Sent: Thursday, November 10, 2016 1:38:34 PM
>> To: DSpace Technical Support
>> Subject: [dspace-tech] Issues with REST find-by-metadata-field in DSpace 5
>>
>> Hi,
>>
>> We're trying to build an application that uses metadata from DSpace's
>> REST API and I'm having some issues. We're testing on DSpace 5.5 with
>> PostgreSQL.
>>
>> First, it seems there is no way to use a wildcard value with the
>> find-by-metadata-field endpoint—I want all items where a field
>> `cg.subject.ilri` exists. Second, for another query, I'm not sure that the
>> API is returning the correct results. Taking into account the text_lang of
>> the metadata, the following database queries and REST API results don't add
>> up. Here are the database results for null, blank, and en_US text_lang
>> values:
>>
>> dspace=# select count(text_value) from metadatavalue where
>> resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
>> text_lang is null;
>>  count
>> ---
>> 15
>> dspace=# select count(text_value) from metadatavalue where
>> resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
>> text_lang='';
>>  count
>> ---
>>  4
>> dspace=# select count(text_value) from metadatavalue where
>> resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
>> text_lang='en_US';
>>  count
>> ---
>> 66
>>
>> Then the API results, in the order of null, blank, and en_US language:
>>
>> $ curl -s -H "accept: application/json" -H "Content-Type:
>> application/json" -X POST "http://localhost:8080/rest/
>> items/find-by-metadata-field" -d '{"key": "cg.subject.ilri","value":
>> "SEEDS"}' | jq length
>> 55
>> $ curl -s -H "accept: application/json" -H "Content-Type:
>> application/json" -X POST "http://localhost:8080/rest/
>> items/find-by-metadata-field" -d '{"key": "cg.subject.ilri","value":
>> "SEEDS", "language":""}' | jq length
>> 34
>> $ curl -s -H "accept: application/json" -H "Content-Type:
>> application/json" -X POST "http://localhost:8080/rest/
>> items/find-by-metadata-field" -d '{"key": "cg.subject.ilri","value":
>> "SEEDS", "language":"en_US"}' | jq length
>>
>> The results don't even remotely match, and there are actually more
>> results from the API than from the database (85 vs 89).
>>
>> Does anyone know what's up with either of these issues? Thanks,
>> --
>>
>> Alan Orth
>> alan.o...@gmail.com
>> https://englishbulgaria.net
>> https://alaninkenya.org
>> https://mjanja.ch
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to dspace-tech+unsubscr...@googlegroups.com> -tech+unsubscr...@googlegroups.com>.
>> To post to this group, send email to dspace-tech@googlegroups.com> dspace-tech@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>
> Alan Orth
> alan.o...@gmail.com
> 

Re: [dspace-tech] Workflow configuration in JSPUI

2016-11-10 Thread Lluís Madurell Alemany
Been working on that, so far we have:

Error while retrieving workflow for the following collection: 
Seems that the ID is correct.

In our workflow.xml:






And then the roles and steps and so on.




-


*Lluís Madurell AlemanyLluis_tgn*

2016-11-10 9:20 GMT+01:00 Lluís Madurell Alemany :

> Hi
>
> We are using a Dspace 5.x with CRIS Module along with JSPUI. We are not
> looking to change to XMLUI.
>
> We are also aware of the limitations when configuring the workflow in our
> system, having only 3 steps is fine. See: http://dspace.2283337.n4.
> nabble.com/How-to-Add-more-than-3-Workflow-Steps-tp4663012p4663067.html
>
> Can we expect to fully configurate these 3 steps and be able to use JSPUI
> UI for the reviewers? Can we just set 2 steps? Can we change all the roles
> and steps according to our Groups/EPersons? Do we have to enable
> Configurable Reviewer Workflow obligatory (implies changes in database)?
>
> Cheers!
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "DSpace Technical Support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/dspace-tech/GUJh-n4jeQw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dspace-tech+unsubscr...@googlegroups.com.
> To post to this group, send email to dspace-tech@googlegroups.com.
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Issues with REST find-by-metadata-field in DSpace 5

2016-11-10 Thread Ilja Sidoroff
Hi,

I tried to do something similar (all items with something in the field X), but 
it seems that find-by-metadata-field does not support wildcards, only exact 
matches. Helix84 suggested SOLR for me, There's also a new REST api for reports 
in 6.0 (Terry Brady suggested that to me). You can probably find the threads 
with my name & those mentioned.

For the other question, are there differences in the item access permissions 
and/or if any of the items are in the workflow or in the collections. I think 
the SQL queries will give you all the items, but I think there is some 
filtering done with the REST - didn't look very deeply into that, though.

Ilja


From: dspace-tech@googlegroups.com  on behalf of 
Alan Orth 
Sent: Thursday, November 10, 2016 1:38:34 PM
To: DSpace Technical Support
Subject: [dspace-tech] Issues with REST find-by-metadata-field in DSpace 5

Hi,

We're trying to build an application that uses metadata from DSpace's REST API 
and I'm having some issues. We're testing on DSpace 5.5 with PostgreSQL.

First, it seems there is no way to use a wildcard value with the 
find-by-metadata-field endpoint—I want all items where a field 
`cg.subject.ilri` exists. Second, for another query, I'm not sure that the API 
is returning the correct results. Taking into account the text_lang of the 
metadata, the following database queries and REST API results don't add up. 
Here are the database results for null, blank, and en_US text_lang values:

dspace=# select count(text_value) from metadatavalue where resource_type_id=2 
and metadata_field_id=203 and text_value='SEEDS' and text_lang is null;
 count
---
15
dspace=# select count(text_value) from metadatavalue where resource_type_id=2 
and metadata_field_id=203 and text_value='SEEDS' and text_lang='';
 count
---
 4
dspace=# select count(text_value) from metadatavalue where resource_type_id=2 
and metadata_field_id=203 and text_value='SEEDS' and text_lang='en_US';
 count
---
66

Then the API results, in the order of null, blank, and en_US language:

$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X 
POST "http://localhost:8080/rest/items/find-by-metadata-field; -d '{"key": 
"cg.subject.ilri","value": "SEEDS"}' | jq length
55
$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X 
POST "http://localhost:8080/rest/items/find-by-metadata-field; -d '{"key": 
"cg.subject.ilri","value": "SEEDS", "language":""}' | jq length
34
$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X 
POST "http://localhost:8080/rest/items/find-by-metadata-field; -d '{"key": 
"cg.subject.ilri","value": "SEEDS", "language":"en_US"}' | jq length

The results don't even remotely match, and there are actually more results from 
the API than from the database (85 vs 89).

Does anyone know what's up with either of these issues? Thanks,
--

Alan Orth
alan.o...@gmail.com
https://englishbulgaria.net
https://alaninkenya.org
https://mjanja.ch

--
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to 
dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Issues with REST find-by-metadata-field in DSpace 5

2016-11-10 Thread Alan Orth
Hi,

We're trying to build an application that uses metadata from DSpace's REST
API and I'm having some issues. We're testing on DSpace 5.5 with PostgreSQL.

First, it seems there is no way to use a wildcard value with the
find-by-metadata-field endpoint—I want all items where a field
`cg.subject.ilri` exists. Second, for another query, I'm not sure that the
API is returning the correct results. Taking into account the text_lang of
the metadata, the following database queries and REST API results don't add
up. Here are the database results for null, blank, and en_US text_lang
values:

dspace=# select count(text_value) from metadatavalue where
resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
text_lang is null;
 count
---
15
dspace=# select count(text_value) from metadatavalue where
resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
text_lang='';
 count
---
 4
dspace=# select count(text_value) from metadatavalue where
resource_type_id=2 and metadata_field_id=203 and text_value='SEEDS' and
text_lang='en_US';
 count
---
66

Then the API results, in the order of null, blank, and en_US language:

$ curl -s -H "accept: application/json" -H "Content-Type: application/json"
-X POST "http://localhost:8080/rest/items/find-by-metadata-field; -d
'{"key": "cg.subject.ilri","value": "SEEDS"}' | jq length
55
$ curl -s -H "accept: application/json" -H "Content-Type: application/json"
-X POST "http://localhost:8080/rest/items/find-by-metadata-field; -d
'{"key": "cg.subject.ilri","value": "SEEDS", "language":""}' | jq length
34
$ curl -s -H "accept: application/json" -H "Content-Type: application/json"
-X POST "http://localhost:8080/rest/items/find-by-metadata-field; -d
'{"key": "cg.subject.ilri","value": "SEEDS", "language":"en_US"}' | jq
length

The results don't even remotely match, and there are actually more results
from the API than from the database (85 vs 89).

Does anyone know what's up with either of these issues? Thanks,
-- 

Alan Orth
alan.o...@gmail.com
https://englishbulgaria.net
https://alaninkenya.org
https://mjanja.ch

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Workflow configuration in JSPUI

2016-11-10 Thread Lluís Madurell Alemany
Hi

We are using a Dspace 5.x with CRIS Module along with JSPUI. We are not 
looking to change to XMLUI.

We are also aware of the limitations when configuring the workflow in our 
system, having only 3 steps is fine. See: 
http://dspace.2283337.n4.nabble.com/How-to-Add-more-than-3-Workflow-Steps-tp4663012p4663067.html

Can we expect to fully configurate these 3 steps and be able to use JSPUI 
UI for the reviewers? Can we just set 2 steps? Can we change all the roles 
and steps according to our Groups/EPersons? Do we have to enable 
Configurable Reviewer Workflow obligatory (implies changes in database)?

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.