New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich submission search #177

Merged
merged 5 commits into from Jun 5, 2014

Conversation

Projects
None yet
2 participants
@ajspadial
Copy link

ajspadial commented May 6, 2014

This small change add startsWith and contains features to the Submission_ID search.

Antonio Jesús Sánchez Padial added some commits May 6, 2014

Antonio Jesús Sánchez Padial
Antonio Jesús Sánchez Padial
@@ -3,6 +3,7 @@
/**
* @file classes/editor/EditorSubmissionDAO.inc.php
*
* Copyright (c) 2014 Instituto Nacional de Investigacion y Tecnologia Agraria y Alimentaria

This comment has been minimized.

@asmecher

asmecher May 6, 2014

Member

Rather than adding a new copyright entity, would you be willing to use "With contributions from..."? Currently Public Knowledge Project doesn't exist as a legal entity (which is why the copyrights are to SFU Library and John), but if we do form a foundation, it will involve transferring copyright. We would rather keep the copyrights simple and consistent to ease that process.

This comment has been minimized.

@ajspadial

ajspadial May 6, 2014

Author

I have to ask my organization, but I guess it won't be an issue.

case 'contains':
$search = '%' . $search . '%';
$params[] = $search;
$searchSql = ' AND CONCAT(a.article_id) LIKE ?';

This comment has been minimized.

@asmecher

asmecher May 6, 2014

Member

I presume the CONCAT is effectively a string cast. Out of curiosity, have you tried this with PostgreSQL?

This comment has been minimized.

@ajspadial

ajspadial May 6, 2014

Author

Yes, it's a easy way to make a string cast.

I haven't tested it there; but PostgreSQL seems to have this function too http://www.postgresql.org/docs/9.1/static/functions-string.html

@asmecher

This comment has been minimized.

Copy link
Member

asmecher commented May 6, 2014

Looks good -- but it would also be good to make these changes to the other parts of the system that do submission ID-based searches. These are...
ProofreaderSubmissionDAO.inc.php
CopyeditorSubmissionDAO.inc.php
SectionEditorSubmissionDAO.inc.php
LayoutEditorSubmissionDAO.inc.php
(Clearly there's room for a common superclass here -- we've addressed that in the forthcoming OJS 3.0.)

@ajspadial

This comment has been minimized.

Copy link
Author

ajspadial commented May 6, 2014

Don't know what's the best approach as I don't know the codebase quite well yet.

I'll try the superclass, and ask for help if doesn't find the way through.

Best.

@asmecher

This comment has been minimized.

Copy link
Member

asmecher commented May 6, 2014

Antonio, don't worry about the superclass -- just make the changes to the other classes, consistent with what you've already done here. I was apologizing for not having abstracted this better in the 2.4.x codebase, but I don't think it's worth doing there at the moment. The problem is already solved in the master branch.

@ajspadial

This comment has been minimized.

Copy link
Author

ajspadial commented May 7, 2014

Please wait to merge till I solve the copyright line. Thanks.

Antonio Jesús Sánchez Padial
@ajspadial

This comment has been minimized.

Copy link
Author

ajspadial commented Jun 5, 2014

If current contributions statement are right, it's ok for us to merge this feature.
Is it ok @asmecher? Thanks a lot.

@asmecher

This comment has been minimized.

Copy link
Member

asmecher commented Jun 5, 2014

Great, thanks, Antonio!

asmecher added a commit that referenced this pull request Jun 5, 2014

Merge pull request #177 from inia-es/richSubmissionSearch
*8791* Rich submission search

@asmecher asmecher merged commit ccf39da into pkp:ojs-stable-2_4 Jun 5, 2014

2 checks passed

continuous-integration/travis-ci The Travis CI build passed
Details
default Scrutinizer: 2755 Issues, 194 Patches — Travis: Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment