Task #1911
closedMove method for getTitlesAfter and getTitlesBefore from project
100%
Description
There is a useful script helper in the project ***. It would be well used in other projects, especially for titles after and before.
- Please move it with scripts
- There is also test which will be moved too
Updated by Marek Klement over 4 years ago
- Subject changed from Move ScriptHelper from AGEL to this module to Move ScriptHelper to this module
Updated by Ondřej Kopr over 4 years ago
- Subject changed from Move ScriptHelper to this module to Move method for getTitlesAfter and getTitlesBefore from project
Updated by Ondřej Kopr over 4 years ago
- Status changed from New to Needs feedback
- Assignee changed from Ondřej Kopr to Peter Štrunc
- % Done changed from 0 to 90
I moved the projspec method and also script and tests.
Commit: https://github.com/bcvsolutions/czechidm-extras/commit/14e63fb937f90ac8f4fd73d4bd0793cda3767bc0 (branch: develop)
Please could you make a review? Thank you. I merged this directly into develop because we need this try on project, Thanks.
Updated by Ondřej Kopr over 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Peter Štrunc to Ondřej Kopr
- % Done changed from 90 to 80
Updated by Ondřej Kopr over 4 years ago
We founded some issues while we evaluate titles afters.
Updated by Ondřej Kopr over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Ondřej Kopr to Peter Štrunc
- % Done changed from 80 to 90
Ondřej Kopr wrote:
We founded some issues while we evaluate titles afters.
@klementm give me wrong info, there isn't issues in parsing and cutting logic, but only with missing title MBA. I made titles dictionary configurable.
Commit: https://github.com/bcvsolutions/czechidm-extras/commit/810d56db539616c59d5ce93b0cc6e6746a5e2216 (branch: develop)
Sorry for two commits, but the second contains configurable titles dictionary.
Documentation: https://wiki.czechidm.com/devel/documentation/modules_extras#get_titles_before_and_after
Please could you continue with feedback?
Updated by Ondřej Kopr over 4 years ago
Update configuration property.
Commit: https://github.com/bcvsolutions/czechidm-extras/commit/8c949c5e1a68d269e052136cb15a3ae818ad527d
Configuration property contains information about project. Documentation was updated.
Updated by Peter Štrunc over 4 years ago
- Target version changed from 1.3.0 to 1.4.0
Updated by Peter Štrunc over 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Peter Štrunc to Ondřej Kopr
Cool feature! :)
Here are few minor notes:
Use StringUtils.isEmpty() instead of
if (value == null || value.isEmpty())
Instead of
String exits = dictonary.stream().filter(t -> t.trim().toLowerCase().equals(finalTitle)).findFirst() .orElse(null);
use
String exits = dictonary.stream() .map(String::trim) .map(String::toLowerCase) .filter(t -> t.equals(finalTitle)) .findFirst() .orElse(null);
instead of
String exits = dictonary.stream().filter(t -> t.trim().toLowerCase().equals(finalTitle)).findFirst() .orElse(null);
It is easier to read.
No other issues were found. You can push it to develop after resolving issues i mentioned above.
Updated by Peter Štrunc over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
I fixed these above mentioned issues. Ticket can be closed now.