•  
     
    story #9882 TQL in follow-up comments
Summary
Empty
TQL in follow-up comments
Empty
summary = "rest" AND @comment = "api"

=> Search all artifacts that contain "rest" in the summary and that have at least one comment mentionning "api".

We search only in the last version of the comment (it can be edited).

"@comment" is available in autocompletion and in available fields selectbox (to be confirmed by UXD).

As follow-up comments may be written in html format, we need to store a striped version of the comment:

  • add striped_body TEXT default NULL
  • add forge upgrade to copy as is comments in text format, or strip html (see Codendi_HTMLPurifier) for comments in html format. No transaction to be able to replay the bucket if it takes too long. Warn in the description that it may takes some time.
  • On artifact update, store the striped version of the comment accordingly to its format.
  • On XML import, store the striped version
  • On comment edition, store the striped version
Empty
Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#9882
Nicolas Terray (nterray)
2017-11-08 11:20
2017-01-18 15:58
4555

References
Referencing story #9882

Git commit

tuleap/tuleap/stable

Add tracker_changeset_comment_fulltext table f912cf3238
Add script to store stripped body of comments b8ad627321
Add @comment autocompletion and helper 768aef30b6
Introduce @comment in TQL grammar 2a54be773f
Raise error when @comment is used ab0f3d85b9
Refactoring: Rename InvalidFields to InvalidSearchables 60beff4046
Rename getField in getSearchable ec7c98e7b0
Rename field by searchable in pegjs (InComparison = field:Searchable) be96f05c1f
@comment can be used in report c291c9eede
Refactoring: rename FromWhereBuilder into FieldFromWhereBuilder f058310395
@comment can be used in report d22caea47e
Refactoring extract fromWhereBuilder in visitor b248ddf8b4
Refactoring rename ComparisaonVisitor in FieldComparisonVisitor 4dcb6fa780
We should be able to search with = in @comment 52f5485060
prevent @comment to be search with other things than a string (NOW/MYSELF/int/float/date) 7b9f20aaf5
Query with "!=" 039a722576
Query with != prevent @comment to be search with other things than a string (NOW/MYSELF/int/float/date/...) 2cd92f6230
query @comment = '' => artifacts without any comments 14dd68d962
rename @comment in @comments a1b432c58f
query @comment != '' => artifacts with at least one comments 5b6edc8e3c
RealInvalidSearchableCollectorVisitor should be renamed 003af09d3b
Add missing translations 861b7f240a

Follow-ups

User avatar

This is not covered in this story, but an extension of this would be:

@comment[submitted_by = "nicolas" OR submitted_by = "joris"] = "rest"

=> Every artifacts where Joris or Nicolas spoke about "rest" in the follow-up comments.

The idea is to be able to put a whole TQL expression between the brackets @comment[<TQL>]

Must be investigated/discussed/estimated later (after the realisation of the current story at least).