Content
View differences
Updated by Alexey Fedorov about 12 years ago
The search lost some features in OpenProject 3.0 when compared to OpenProject 2.4.
### OpenProject 2.4
In the olden times of OpenProject 2.4 the search also included journal notes in the result page:

Not only is the match within the journal note shown, but also does the result entry link to said note.
### OpenProject 3.0
While OpenProject 3.0 still searches through journal notes it does not show the matched note anymore alongside the entity (e.g. work package) it is associated with:

Note how the result entry does not link to the matched journal note anymore either.
### Bugs in OpenProject 2.4
The likely reason this has been removed is a rather tricky search bug in OpenProject 2.4 where the results are sorted after the creation date of the entities while the creation date of the associated journal note is used for pagination. This breaks pagination. If/When reintroducing the feature described above it is important to pay attention to not causing the same sort of bug again.
#### Steps to reproduce
If you can reproduce the following behaviour you have reintroduced the same bug:
1. Search for term A which has at least two pages of results
2. Go through the pages and validate that everything is correct
3. Update an unrelated work package with a creation date older than any of the search results. Use A within the update comment.
4. search again for A
1. (Now the work package which has been updated with A as a comment appears as the last result of page two)
5. when on page two of the results go back
6. you see an completely empty result page
This is due the creation date of the journal entry being used as the pagination offset as opposed to the creation date of the associated work package.
#### Possible fix?
Search results should be sorted not by the creation date of the entity but by the creation date of the journal entry (if one has been matched).
### OpenProject 2.4
In the olden times of OpenProject 2.4 the search also included journal notes in the result page:

Not only is the match within the journal note shown, but also does the result entry link to said note.
### OpenProject 3.0
While OpenProject 3.0 still searches through journal notes it does not show the matched note anymore alongside the entity (e.g. work package) it is associated with:

Note how the result entry does not link to the matched journal note anymore either.
### Bugs in OpenProject 2.4
The likely reason this has been removed is a rather tricky search bug in OpenProject 2.4 where the results are sorted after the creation date of the entities while the creation date of the associated journal note is used for pagination. This breaks pagination. If/When reintroducing the feature described above it is important to pay attention to not causing the same sort of bug again.
#### Steps to reproduce
If you can reproduce the following behaviour you have reintroduced the same bug:
1. Search for term A which has at least two pages of results
2. Go through the pages and validate that everything is correct
3. Update an unrelated work package with a creation date older than any of the search results. Use A within the update comment.
4. search again for A
1. (Now the work package which has been updated with A as a comment appears as the last result of page two)
5. when on page two of the results go back
6. you see an completely empty result page
This is due the creation date of the journal entry being used as the pagination offset as opposed to the creation date of the associated work package.
#### Possible fix?
Search results should be sorted not by the creation date of the entity but by the creation date of the journal entry (if one has been matched).