summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/filter/issuable_state_filter_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Change all `:empty_project` to `:project`rs-empty_project-defaultRobert Speicher2017-08-021-2/+2
|
* Merge issuable "reopened" state into "opened"merge-issuable-reopened-into-opened-stateYorick Peterse2017-07-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Follow feedback on the reviewLin Jen-Shin2017-04-261-23/+47
|
* Skip issuable without a project in IssuableExtractor#extractLin Jen-Shin2017-04-251-55/+58
| | | | Closes #31280
* Do not append issuable state to links with custom anchorissuable-state-custom-linksAdam Niedzielski2017-04-191-32/+76
| | | | | Closes #30916 Change the presentation from [closed] to (closed)
* Display issuable state only in notes and issuable descriptionAdam Niedzielski2017-04-191-11/+21
| | | | Closes #30964
* Fix appending state to issuable referencesfix-appending-state-to-issuable-referencesAdam Niedzielski2017-04-131-11/+32
| | | | | | | Closes #30874. Ignore nodes with no children. Append directly to the node instead of the last child of the node to avoid inheriting formatting from the last child
* Add indication for closed or merged issuables in GFMadam-finish-5993-closed-issuableAdam Buckland2017-04-071-0/+95
Example: for issues that are closed, the links will now show '[closed]' following the issue number. This is done as post-process after the markdown has been loaded from the cache as the status of the issue may change between the cache being populated and the content being displayed. In order to avoid N+1 queries problem when rendering notes ObjectRenderer populates the cache of referenced issuables for all notes at once, before the post processing phase. As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes method has been refactored to return a Hash utilising the node itself as the key, since this was a common pattern of usage for this method.