[Archivesspace_Users_Group] Custom reports with string params?
Nick Butler
npwb2 at cam.ac.uk
Mon Oct 5 10:47:08 EDT 2020
Thanks! We're currently on 2.7.1, looking to upgrade to 2.8 in the near future. Without adding a file such as the one given in my earlier message, I get a 500 error with "ActionView::Template::Error (Missing partial jobs/report_partials/_string with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb]}" in the log.
Many thanks,
Nick
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Mayo, Dave <dave_mayo at harvard.edu>
Sent: 05 October 2020 15:06
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Custom reports with string params?
Hmmm. I will double check, but this is running in production over here right now, so I’m wondering if the reporting functionality has changed since I looked at it. What version of ASpace are you targeting?
--
Dave Mayo (he/him)
Senior Digital Library Software Engineer
Harvard University > HUIT > LTS
From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Nick Butler <npwb2 at cam.ac.uk>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Monday, October 5, 2020 at 5:02 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Custom reports with string params?
Hi Dave,
Thank you for this link, it's really helpful. I've installed your reports plugin on a dev system and am now hitting the same problem I'm having with my report - how to get the text box to show up on the report screen (i.e. what to put in the jobs/report_partials/_string partial). I tried just using the following line:
<% form.textfield name, nil, :class => 'text-field form-control' %>
But this leads to the attached being displayed instead of a text box! Might you be able to advise on how you were able to configure String parameter entry? It's not part of this plugin as far as I can see.
Many thanks,
Nick
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Mayo, Dave <dave_mayo at harvard.edu>
Sent: 02 October 2020 17:07
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Custom reports with string params?
Hi,
We have a plugin we wrote with some custom SQL reports – this one uses a string parameter for an EADID or list of EADIDs - https://github.com/harvard-library/harvard_aspace_reports/blob/master/backend/model/resource_top_containers.rb<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_harvard-2Dlibrary_harvard-5Faspace-5Freports_blob_master_backend_model_resource-5Ftop-5Fcontainers.rb&d=DwMF-g&c=WO-RGvefibhHBZq3fL85hQ&r=_Mv1dY22K7jvT5MD7xjbvGVzRDOUMhx4WYcnPSIzYnE&m=vxglUw8t_VtzdmI4EgmrlZKgEhbH4HWb62nSSw8qxSg&s=_4X19v5v8vsd2PaH5kstXhBz--LcfhRVWxmxhDgeTxk&e=>
This is currently installed in production and working; it should be fine to install it and test locally or on a QA system, if you want to try it out in a live system.
--
Dave Mayo (he/him)
Senior Digital Library Software Engineer
Harvard University > HUIT > LTS
From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Karen Miller <k-miller3 at northwestern.edu>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Friday, October 2, 2020 at 9:42 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Custom reports with string params?
Hi Nick,
I have an SQL query that I’ve embedded into an Excel spreadsheet (as a .odc file) which prompts the user for a value. The value I’m prompting for is numeric, but the code could be adjusted to take a string. I don’t think this is what you want, but if it is, please let me know and I’ll forward the code.
Karen
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Nick Butler
Sent: Friday, October 02, 2020 6:14 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] Custom reports with string params?
Hi all,
We've been asked to create a custom report that allows the user running it to input a string which is then used to search across various fields. I've checked through the pre-existing reports, and through several reports created by other institutions, but I haven't found an example of a report accepting a string parameter (only booleans and dates). I see from e.g. https://github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb#L121<https://urldefense.com/v3/__https:/github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb*L121__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!GX75QheNm0-XxIApINdOyeac54bS2ZjNyPlm_nxqTYFfTBABH9vDI0OxgolnoLIKYgcArjCl$> that it should be possible to use a custom partial for different data types but nothing I've tried has worked so far. Is anyone doing anything like this, and might they have an example of it working?
Many thanks!
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20201005/70246dfd/attachment.html>
More information about the Archivesspace_Users_Group
mailing list