Commit graph

15 commits

Author SHA1 Message Date
Adam Niedzielski
9da3076944 Improve support for external issue references 2017-06-30 14:47:53 +02:00
Sean McGivern
9f612cc428 Fix issues mentioned but not closed for JIRA
The `ReferenceExtractor` would return an array of `ExternalIssue`
objects, and then perform `Array#-` to remove the issues
closed. `ExternalIssue`s had `==` defined, but not `hash` or `eql?`,
which are used by `Array#-`.
2017-03-06 14:18:49 +00:00
Douwe Maan
ccbebbdfeb Enable Performance/RedundantMatch 2017-02-23 09:31:57 -06:00
James Lopez
112f470572 Fix cross-project references copy to include the project reference
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
2017-01-03 13:01:46 +01:00
Yorick Peterse
24261f2dbd
Add the method ExternalIssue#project_id
This method returns the project's ID, making ExternalIssue slightly more
compatible with Issue (which also defines the "project_id" method).
2016-11-07 12:49:24 +01:00
Felipe Artur
8e4301d982 Prevent wrong markdown on issue ids when project has Jira service activated 2016-10-19 13:46:04 -02:00
BaldinoF
b04140a1e4 Merge branch 'master' into number_sign_for_external_issue_ref 2016-04-17 18:17:27 +02:00
Baldinof
3918fce5bd Hide number sign for string prefixed external issues 2016-04-12 10:01:52 +02:00
Yorick Peterse
e7849b0b25 Memoize reference_pattern/link_reference_pattern
These methods are called quite often in loops so by memoizing their
output we can reduce timings a bit.
2016-04-01 11:13:30 +02:00
Baldinof
b372968e93 Add number sign on external issue reference text 2016-03-22 15:36:50 +01:00
Blake Hitchcock
4be65c3231 Update ExternalIssue regex for JIRA integration
The pattern in the `::reference_pattern` class method in the
ExternalIssue model does not match all valid forms of JIRA project
names. I have updated the regex to match JIRA project names with numbers
and underscores. More information on valid JIRA project names can be
found here:
https://confluence.atlassian.com/jira/changing-the-project-key-format-192534.html

* The first character must be a letter,
* All letters used in the project key must be from the Modern Roman Alphabet and upper case, and
* Only letters, numbers or the underscore character can be used.
2016-01-26 15:55:40 -05:00
Robert Speicher
b88da58cb6 Add reference_pattern to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher
c0faf91ff2 Add to_reference for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Robert Speicher
84a7675ea6 Remove title_for_issue helper 2015-04-30 17:27:33 -04:00
Marin Jankovski
29e606deec Add ExternalIssue base model to make issue referencing more robust for external issue trackers. 2015-02-11 09:21:57 -08:00