Some time in the last few weeks, the JIRA Issues: field when performing arc diff seems to have stopped functioning; it's simply stripped from the commit message entirely after the diff is performed as far as I can tell. Editing the revision and manually linking the ticket continues to work fine, so I assume it's something in the differential text parser.
Description
Revisions and Commits
Related Objects
- Duplicates Merged Here
- T4562: Cannot use "arc diff" with JIRA integration
Event Timeline
I think that I discovered nature of this bug. Description below:
I've noticed that if I specify in commit message text "Jira issues: XX-1234", then ticket numbers are ignored complety and in message template all that remains is just "Jira issues:" (field is recognized, but values are lost). After poke-debugging I've discovered "patch" which requires to add in DifferentialJIRAIssuesField two simple methods:
public function getRequiredHandlePHIDsForCommitMessage() { return $this->getValue(); } public function readValueFromCommitMessage($value) { $this->setValue($value); }
This may be not fully-featured implementation (e.g. validation is missing), but It's sufficient for whole scenario to work.
This is because default implementation of those methods are hitting generic proxy pattern in DifferentialCustomField
if ($this->getProxy()) { $this->getProxy()->someMethod($value); return $this; } return $this;
and there is no proxy, so those methods do nothing. Then, in ConduitAPI_differential_getcommitmessage_Method when call $custom_field->readValueFromCommitMessage($value); is made, then value from request is lost.
Please let me know what you think of this fix?