WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsSomehow this message didn't come through to me but my colleague was able to forward it.
First of all, thank you for the response.
As I was waiting, I started to try some low-impact experiments. I added "imported" in the recordstatus field on the first and last record in the collectionobjects_common table.
However, when I tried to view one of the records with the value in the id field using a URL like this I got an error message: Does not exist
http://sdchm.bpoc.org/collectionspace/ui/sdchm/html/cataloging.html?csid=aeda19fe-6d7c-4046-8768-502b96520b8f
This is the first id on the list. I tried to look up the last one and had the same result._____
I am unclear about how much the search problem is. Does this affect only the "imported" value or the rest of the records? You say the "new value" so I think it might be the ability to search for that.
It makes me wonder if a delete of objects and a reimport is the way to go. If so, I want to be sure I have the right kind of SQL for that.
James D. Keeline
From: Dani Heinemeyer <dheinemeyer@bpoc.org>
To: James Keeline james@keeline.com
Sent: Thursday, June 23, 2016 8:05 PM
Subject: Fwd: [Talk] Update "Record Status" for all objects to "In Process"
FYI
---------- Forwarded message ----------
From: Ray Lee rhlee@berkeley.edu
Date: Thursday, June 23, 2016
Subject: [Talk] Update "Record Status" for all objects to "In Process"
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Hi James,You can do that SQL update (a tomcat restart will be needed for the values to be seen), but there is a catch. When you do SQL updates directly to the database, the full text search index is not updated, so if you were to do a keyword search in CSpace for the new value, no records would be found. At Berkeley we have a program we run to force an update of the full text index, but it's written for CSpace 4.2, and it won't work on 4.3, because the version of Nuxeo is different. Maybe someone on the list has a solution for 4.3?
Updating through the REST API or import service will update the full text index.
Ray
On Thu, Jun 23, 2016 at 5:09 PM, James Keeline james@keeline.com wrote:
I have successfully added a value on the option list of "imported" in the UI by changing this file:
~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-other-dimension.xml
This required making a new sdchm-other-dimension.xml file in the tenants/sdchm/ directory and copying over the relevant items from the master copy at:
~/cspace_source/application/tomcat-main/src/main/resources/defaults/base-other-dimension.xml_____
Now I wish to UPDATE the records if I can.
Exploring the PostgreSQL nuxeo_default database, I see that the present values for recordstatus are empty for all 2000+ records:
\l\c nuxeo_default\dtSELECT id, recordstatus FROM collectionobjects_common LIMIT 40;
id | recordstatus --------------------------------------+-------------- aeda19fe-6d7c-4046-8768-502b96520b8f | bdbefae4-2034-49ad-8336-9462277a3a2e | af945345-9f06-48f1-9d18-1eac74c72792 | d31a2b67-c4ea-498e-bd82-55cd63882d1c | c21815ca-fadb-43fc-b089-b45a786d10a6 | 91e6a0e7-de38-4926-a75d-ea7ca2f6a872 | 8da4b632-721c-4f30-b82f-0dfb63258566 | ba9be6ad-e843-4f57-907c-1539819b59a0 | 6fb1ae37-8d77-432f-bd0d-59cbb43c8f8e | a445838e-a094-4e20-b634-678852ee9800 | 8b91bdca-f70c-4647-b392-3351e78cc625 | 6c392956-1729-48a6-8328-8f7a990a494f | f5787fff-9a91-42f8-99c0-819755d58dd8 | a504fff1-8770-4e5d-a6e3-560c9ac830c3 | 1736dbb8-c703-48cd-a708-a7ed3560f75f | b78dda13-6bcd-42df-aa7e-b44c8bc308a4 | 04311d8a-df1d-4307-beb6-b0ce24272618 | 0970207b-e583-496f-9a7d-89590374f95d | 78297344-0c63-4680-96ed-a5faed1312c7 | 3f5f6329-759e-4145-a5c0-2bd11d86dee0 | c3a1abfb-fa66-445a-b546-709f097122aa | 42b61649-9b54-4b4e-9521-63e41106e701 | e7172551-669d-4ddc-bc65-19b939a3ba16 | b750b94a-12e8-4abd-973c-10809443120c | 62949411-39ef-4a38-93cf-47f9e26b8782 | 640da20b-2b31-42d8-87c6-a23593262caa | 304ac81f-d9a4-4349-b00c-5cf3da2271ea | 8e0478d8-68b4-48c4-94a2-87dfdebcafc5 | c8f327cd-7c03-4764-be8c-e3622743a757 | cc185fe5-6474-43c6-8b35-1cdf3fd06e2f | 7828a108-83f4-43dd-a362-88d793b0010f | d0a7eda4-2bde-4242-ad3f-f9ed06a47ec9 | efb4b6d1-0111-4f57-a5f0-b87914bb72be | 369b0680-0682-4609-9178-3077d9565122 | 7e2c3d30-52db-45bc-a3e9-8601feaeadb5 | 73e809c5-c55b-4b58-adff-ee17b4410e0e | 778df5c3-0c32-4d30-86d4-00f009bdd772 | 14bc9a17-146b-4c09-ac6c-01747ff4bcad | 5b7ddc95-04ec-4ae7-88ef-859d6ca912db | d085d436-75d2-4daa-a330-8a177529b0cd | (40 rows)
Is this the value to change with UPDATE and can I simply add the value imported per my change to the available options?
If there is another way/place to do this, please let me know. James D. Keeline
From: James Keeline <james@keeline.com>
To: Talk talk@lists.collectionspace.org
Sent: Thursday, June 23, 2016 3:10 PM
Subject: [Talk] Update "Record Status" for all objects to "In Process"
We have imported about 2,000 objects via import service to the SDCHM installation of CollectionSpace 4.3. Upon feedback from the director, we would like to change the Record Status of these to either a new value of "imported" or an existing value of "in process". At present they have the value of "approved."
Aside from adding the additional status in the XML, I see two paths to achieve this:
1. Delete the existing object records, adjust the XML payload to reflect the correct value for Record Status (recordStatus), import the XML payload.
2. Use a PSQL UPDATE statement to alter the value in all of the object records.
I would appreciate advice on the SQL part of these processes. If one is superior to the other, let me know of that. James D. Keeline
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Dani Heinemeyer | Special Projects Liaison (contractor)
BALBOA PARK ONLINE COLLABORATIVE
P (619) 331-1960 E dheinemeyer@bpoc.org2131 Pan American Plaza, San Diego, CA 92101
Innovative | Collaborative | bpoc.org
Sign up for our monthly emails about tech projects & workshops.
Hi James,
The value in the id column is not actually the csid. To find the csid, look
in the name column of the hierarchy table. So SELECT name FROM hierarchy
WHERE id = '<the id>' will get you the csid.
Right, the full text issue just means that when you search for "imported",
it won't find any of the records on which you set that value using SQL. The
value will still display when you open the record, and you'll still be able
to find the record when searching for other strings that exist in the
record. This might not be a concern, if you don't expect users to do
keyword searches using the string "imported" to locate records.
Ray
On Thu, Jun 23, 2016 at 8:27 PM, James Keeline james@keeline.com wrote:
Somehow this message didn't come through to me but my colleague was able
to forward it.
First of all, thank you for the response.
As I was waiting, I started to try some low-impact experiments. I added "
imported" in the recordstatus field on the first and last record in
the collectionobjects_common table.
However, when I tried to view one of the records with the value in the *id
*field using a URL like this I got an error message: Does not exist
This is the first id on the list. I tried to look up the last one and had
the same result.
I am unclear about how much the search problem is. Does this affect only
the "imported" value or the rest of the records? You say the "new value"
so I think it might be the ability to search for that.
It makes me wonder if a delete of objects and a reimport is the way to
go. If so, I want to be sure I have the right kind of SQL for that.
James D. Keeline
From: Dani Heinemeyer dheinemeyer@bpoc.org
To: James Keeline james@keeline.com
Sent: Thursday, June 23, 2016 8:05 PM
Subject: Fwd: [Talk] Update "Record Status" for all objects to "In
Process"
FYI
---------- Forwarded message ----------
From: Ray Lee rhlee@berkeley.edu
Date: Thursday, June 23, 2016
Subject: [Talk] Update "Record Status" for all objects to "In Process"
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Hi James,
You can do that SQL update (a tomcat restart will be needed for the values
to be seen), but there is a catch. When you do SQL updates directly to the
database, the full text search index is not updated, so if you were to do a
keyword search in CSpace for the new value, no records would be found. At
Berkeley we have a program we run to force an update of the full text
index, but it's written for CSpace 4.2, and it won't work on 4.3, because
the version of Nuxeo is different. Maybe someone on the list has a solution
for 4.3?
Updating through the REST API or import service will update the full text
index.
Ray
On Thu, Jun 23, 2016 at 5:09 PM, James Keeline james@keeline.com wrote:
I have successfully added a value on the option list of "imported" in the
UI by changing this file:
~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-other-dimension.xml
This required making a new sdchm-other-dimension.xml file in the
tenants/sdchm/ directory and copying over the relevant items from the
master copy at:
~/cspace_source/application/tomcat-main/src/main/resources/defaults/base-other-dimension.xml
Now I wish to UPDATE the records if I can.
Exploring the PostgreSQL nuxeo_default database, I see that the present
values for recordstatus are empty for all 2000+ records:
\l
\c nuxeo_default
\dt
SELECT id, recordstatus FROM collectionobjects_common LIMIT 40;
id | recordstatus
--------------------------------------+--------------
aeda19fe-6d7c-4046-8768-502b96520b8f |
bdbefae4-2034-49ad-8336-9462277a3a2e |
af945345-9f06-48f1-9d18-1eac74c72792 |
d31a2b67-c4ea-498e-bd82-55cd63882d1c |
c21815ca-fadb-43fc-b089-b45a786d10a6 |
91e6a0e7-de38-4926-a75d-ea7ca2f6a872 |
8da4b632-721c-4f30-b82f-0dfb63258566 |
ba9be6ad-e843-4f57-907c-1539819b59a0 |
6fb1ae37-8d77-432f-bd0d-59cbb43c8f8e |
a445838e-a094-4e20-b634-678852ee9800 |
8b91bdca-f70c-4647-b392-3351e78cc625 |
6c392956-1729-48a6-8328-8f7a990a494f |
f5787fff-9a91-42f8-99c0-819755d58dd8 |
a504fff1-8770-4e5d-a6e3-560c9ac830c3 |
1736dbb8-c703-48cd-a708-a7ed3560f75f |
b78dda13-6bcd-42df-aa7e-b44c8bc308a4 |
04311d8a-df1d-4307-beb6-b0ce24272618 |
0970207b-e583-496f-9a7d-89590374f95d |
78297344-0c63-4680-96ed-a5faed1312c7 |
3f5f6329-759e-4145-a5c0-2bd11d86dee0 |
c3a1abfb-fa66-445a-b546-709f097122aa |
42b61649-9b54-4b4e-9521-63e41106e701 |
e7172551-669d-4ddc-bc65-19b939a3ba16 |
b750b94a-12e8-4abd-973c-10809443120c |
62949411-39ef-4a38-93cf-47f9e26b8782 |
640da20b-2b31-42d8-87c6-a23593262caa |
304ac81f-d9a4-4349-b00c-5cf3da2271ea |
8e0478d8-68b4-48c4-94a2-87dfdebcafc5 |
c8f327cd-7c03-4764-be8c-e3622743a757 |
cc185fe5-6474-43c6-8b35-1cdf3fd06e2f |
7828a108-83f4-43dd-a362-88d793b0010f |
d0a7eda4-2bde-4242-ad3f-f9ed06a47ec9 |
efb4b6d1-0111-4f57-a5f0-b87914bb72be |
369b0680-0682-4609-9178-3077d9565122 |
7e2c3d30-52db-45bc-a3e9-8601feaeadb5 |
73e809c5-c55b-4b58-adff-ee17b4410e0e |
778df5c3-0c32-4d30-86d4-00f009bdd772 |
14bc9a17-146b-4c09-ac6c-01747ff4bcad |
5b7ddc95-04ec-4ae7-88ef-859d6ca912db |
d085d436-75d2-4daa-a330-8a177529b0cd |
(40 rows)
Is this the value to change with UPDATE and can I simply add the value
imported per my change to the available options?
If there is another way/place to do this, please let me know.
James D. Keeline
From: James Keeline james@keeline.com
To: Talk talk@lists.collectionspace.org
Sent: Thursday, June 23, 2016 3:10 PM
Subject: [Talk] Update "Record Status" for all objects to "In Process"
We have imported about 2,000 objects via import service to the SDCHM
installation of CollectionSpace 4.3. Upon feedback from the director, we
would like to change the Record Status of these to either a new value
of "imported" or an existing value of "in process". At present they have
the value of "approved."
Aside from adding the additional status in the XML, I see two paths to
achieve this:
Delete the existing object records, adjust the XML payload to reflect
the correct value for Record Status (recordStatus), import the XML
payload.
Use a PSQL UPDATE statement to alter the value in all of the object
records.
I would appreciate advice on the SQL part of these processes. If one is
superior to the other, let me know of that.
James D. Keeline
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Dani Heinemeyer | Special Projects Liaison (contractor)
BALBOA PARK ONLINE COLLABORATIVE
P (619) 331-1960 E dheinemeyer@bpoc.org
2131 Pan American Plaza, San Diego, CA 92101
Innovative | Collaborative | bpoc.org http://www.bpoc.org/
Sign up http://eepurl.com/pMVqn for our monthly emails about tech
projects & workshops.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
You're right. I can live without being able to search on that... at least for today. I suppose that as values are changed through the web UI on individual records that they will get updated in the fulltext search.
OK. I figured that there was a different unique ID being used at the URL level for the csid. I appreciate being pointed in the right direction.
I think I have a path forward. I will make a couple tests and then on a larger scale.
Thank you again. James D. Keeline
From: Ray Lee <rhlee@berkeley.edu>
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Sent: Thursday, June 23, 2016 8:43 PM
Subject: Re: [Talk] Update "Record Status" for all objects to "In Process"
Hi James,The value in the id column is not actually the csid. To find the csid, look in the name column of the hierarchy table. So SELECT name FROM hierarchy WHERE id = '<the id>' will get you the csid.
Right, the full text issue just means that when you search for "imported", it won't find any of the records on which you set that value using SQL. The value will still display when you open the record, and you'll still be able to find the record when searching for other strings that exist in the record. This might not be a concern, if you don't expect users to do keyword searches using the string "imported" to locate records.
Ray
On Thu, Jun 23, 2016 at 8:27 PM, James Keeline james@keeline.com wrote:
Somehow this message didn't come through to me but my colleague was able to forward it.
First of all, thank you for the response.
As I was waiting, I started to try some low-impact experiments. I added "imported" in the recordstatus field on the first and last record in the collectionobjects_common table.
However, when I tried to view one of the records with the value in the id field using a URL like this I got an error message: Does not exist
http://sdchm.bpoc.org/collectionspace/ui/sdchm/html/cataloging.html?csid=aeda19fe-6d7c-4046-8768-502b96520b8f
This is the first id on the list. I tried to look up the last one and had the same result._____
I am unclear about how much the search problem is. Does this affect only the "imported" value or the rest of the records? You say the "new value" so I think it might be the ability to search for that.
It makes me wonder if a delete of objects and a reimport is the way to go. If so, I want to be sure I have the right kind of SQL for that.
James D. Keeline
From: Dani Heinemeyer <dheinemeyer@bpoc.org>
To: James Keeline james@keeline.com
Sent: Thursday, June 23, 2016 8:05 PM
Subject: Fwd: [Talk] Update "Record Status" for all objects to "In Process"
FYI
---------- Forwarded message ----------
From: Ray Lee rhlee@berkeley.edu
Date: Thursday, June 23, 2016
Subject: [Talk] Update "Record Status" for all objects to "In Process"
To: James Keeline james@keeline.com
Cc: Talk talk@lists.collectionspace.org
Hi James,You can do that SQL update (a tomcat restart will be needed for the values to be seen), but there is a catch. When you do SQL updates directly to the database, the full text search index is not updated, so if you were to do a keyword search in CSpace for the new value, no records would be found. At Berkeley we have a program we run to force an update of the full text index, but it's written for CSpace 4.2, and it won't work on 4.3, because the version of Nuxeo is different. Maybe someone on the list has a solution for 4.3?
Updating through the REST API or import service will update the full text index.
Ray
On Thu, Jun 23, 2016 at 5:09 PM, James Keeline james@keeline.com wrote:
I have successfully added a value on the option list of "imported" in the UI by changing this file:
~/cspace_source/application/tomcat-main/src/main/resources/tenants/sdchm/sdchm-other-dimension.xml
This required making a new sdchm-other-dimension.xml file in the tenants/sdchm/ directory and copying over the relevant items from the master copy at:
~/cspace_source/application/tomcat-main/src/main/resources/defaults/base-other-dimension.xml_____
Now I wish to UPDATE the records if I can.
Exploring the PostgreSQL nuxeo_default database, I see that the present values for recordstatus are empty for all 2000+ records:
\l\c nuxeo_default\dtSELECT id, recordstatus FROM collectionobjects_common LIMIT 40;
id | recordstatus --------------------------------------+-------------- aeda19fe-6d7c-4046-8768-502b96520b8f | bdbefae4-2034-49ad-8336-9462277a3a2e | af945345-9f06-48f1-9d18-1eac74c72792 | d31a2b67-c4ea-498e-bd82-55cd63882d1c | c21815ca-fadb-43fc-b089-b45a786d10a6 | 91e6a0e7-de38-4926-a75d-ea7ca2f6a872 | 8da4b632-721c-4f30-b82f-0dfb63258566 | ba9be6ad-e843-4f57-907c-1539819b59a0 | 6fb1ae37-8d77-432f-bd0d-59cbb43c8f8e | a445838e-a094-4e20-b634-678852ee9800 | 8b91bdca-f70c-4647-b392-3351e78cc625 | 6c392956-1729-48a6-8328-8f7a990a494f | f5787fff-9a91-42f8-99c0-819755d58dd8 | a504fff1-8770-4e5d-a6e3-560c9ac830c3 | 1736dbb8-c703-48cd-a708-a7ed3560f75f | b78dda13-6bcd-42df-aa7e-b44c8bc308a4 | 04311d8a-df1d-4307-beb6-b0ce24272618 | 0970207b-e583-496f-9a7d-89590374f95d | 78297344-0c63-4680-96ed-a5faed1312c7 | 3f5f6329-759e-4145-a5c0-2bd11d86dee0 | c3a1abfb-fa66-445a-b546-709f097122aa | 42b61649-9b54-4b4e-9521-63e41106e701 | e7172551-669d-4ddc-bc65-19b939a3ba16 | b750b94a-12e8-4abd-973c-10809443120c | 62949411-39ef-4a38-93cf-47f9e26b8782 | 640da20b-2b31-42d8-87c6-a23593262caa | 304ac81f-d9a4-4349-b00c-5cf3da2271ea | 8e0478d8-68b4-48c4-94a2-87dfdebcafc5 | c8f327cd-7c03-4764-be8c-e3622743a757 | cc185fe5-6474-43c6-8b35-1cdf3fd06e2f | 7828a108-83f4-43dd-a362-88d793b0010f | d0a7eda4-2bde-4242-ad3f-f9ed06a47ec9 | efb4b6d1-0111-4f57-a5f0-b87914bb72be | 369b0680-0682-4609-9178-3077d9565122 | 7e2c3d30-52db-45bc-a3e9-8601feaeadb5 | 73e809c5-c55b-4b58-adff-ee17b4410e0e | 778df5c3-0c32-4d30-86d4-00f009bdd772 | 14bc9a17-146b-4c09-ac6c-01747ff4bcad | 5b7ddc95-04ec-4ae7-88ef-859d6ca912db | d085d436-75d2-4daa-a330-8a177529b0cd | (40 rows)
Is this the value to change with UPDATE and can I simply add the value imported per my change to the available options?
If there is another way/place to do this, please let me know. James D. Keeline
From: James Keeline <james@keeline.com>
To: Talk talk@lists.collectionspace.org
Sent: Thursday, June 23, 2016 3:10 PM
Subject: [Talk] Update "Record Status" for all objects to "In Process"
We have imported about 2,000 objects via import service to the SDCHM installation of CollectionSpace 4.3. Upon feedback from the director, we would like to change the Record Status of these to either a new value of "imported" or an existing value of "in process". At present they have the value of "approved."
Aside from adding the additional status in the XML, I see two paths to achieve this:
1. Delete the existing object records, adjust the XML payload to reflect the correct value for Record Status (recordStatus), import the XML payload.
2. Use a PSQL UPDATE statement to alter the value in all of the object records.
I would appreciate advice on the SQL part of these processes. If one is superior to the other, let me know of that. James D. Keeline
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Dani Heinemeyer | Special Projects Liaison (contractor)
BALBOA PARK ONLINE COLLABORATIVE
P (619) 331-1960 E dheinemeyer@bpoc.org2131 Pan American Plaza, San Diego, CA 92101
Innovative | Collaborative | bpoc.org
Sign up for our monthly emails about tech projects & workshops.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org