Bug 1571643 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Cam,

If you look at the [definition of the TestFailure class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/push-health/TestFailure.jsx#L167) you'll see that it inherits a job object. The [definition of the CompareTable class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/perfherder/compare/CompareTable.jsx#L164-L167) I'm working with doesn't get any job instance, I only have the data.results.originalJobIds array that contains some job ids. So I need a function that is returning a job instance based on the job id. It wouldn't really be helpful to get the job in the class definition because this [compare page(this link is just an example)](https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=c5cf6ea700c1d0c91fc3ab3227ce6569649a1cfb&selectedTimeRange=172800) contains a table generated by looping through this data array, so each of  those retrigger buttons (placed on each row of the *# Runs* column) depends on every iteration's results.originalJobIds.
Cam,

If you look at the [definition of the TestFailure class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/push-health/TestFailure.jsx#L167) you'll see that it inherits a job object. The [definition of the CompareTable class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/perfherder/compare/CompareTable.jsx#L164-L167) I'm working with doesn't get any job instance, I only have the **data.results.originalJobIds** array that contains some job ids. So I need a function that is returning a job instance based on the job id. It wouldn't really be helpful to get the job in the class definition because this [compare page(this link is just an example)](https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=c5cf6ea700c1d0c91fc3ab3227ce6569649a1cfb&selectedTimeRange=172800) contains a table generated by looping through this data array, so each of  those retrigger buttons (placed on each row of the *# Runs* column) depends on every iteration's **results.originalJobIds**.
Cam,

If you look at the [definition of the TestFailure class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/push-health/TestFailure.jsx#L167) you'll see that it inherits a job object. The [definition of the CompareTable class](https://github.com/mozilla/treeherder/blob/0ddd5a80e1aa0441199ce1d15da1aeea2a220033/ui/perfherder/compare/CompareTable.jsx#L164-L167) I'm working with doesn't get any job instance, I only have the **data.results.originalJobIds** array that contains some job ids. So I need a function that is returning a job instance based on the job id. It wouldn't really be helpful to get the job in the class definition because this [compare page(this link is just an example)](https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&newProject=try&newRevision=c5cf6ea700c1d0c91fc3ab3227ce6569649a1cfb&selectedTimeRange=172800) contains a table generated by looping through this data array, so each of  those retrigger buttons (placed on each row of the *# Runs* column) depends on every iteration's **results.originalJobIds**.

Here is a pull request preview of when I worked so far: https://github.com/mozilla/treeherder/compare/master...alexandru-io:retrigger_compare_view?expand=1

Back to Bug 1571643 Comment 7