Large-amplitude oscillations are a common occurrence in solar prominences. These oscillations are triggered by energetic phenomena such as jets and flares. On March 14-15, 2015, a filament partially erupted in two stages, leading to oscillations in different parts of it. In this study, we aim to explore the longitudinal oscillations resulting from the eruption, with special focus on unravelling the underlying mechanisms responsible for their initiation. We pay special attention to the huge oscillation on March 15. The oscillations and jets were analysed using the time-distance technique. For the study of flares and their interaction with the filament, we analysed the different AIA channels in detail and used the differential-emission-measure (DEM) technique. In the initial phase of the event, a jet induces the fragmentation of the filament, which causes it to split into two segments. One of the segments remains in the same position, while the other is detached and moves to a different location. This causes oscillations in both segments: (a) the change of position apparently causes the detached segment to oscillate longitudinally with a period of periodlalofirstphaseDF ; (b) the jet flows reach the remaining filament also producing longitudinal oscillations with a period of periodlalofirstphaseRF . In the second phase, on March 15 another jet seemingly activates the detached filament eruption. After the eruption, there is an associated flare. A large longitudinal oscillation is produced in the remnant segment with a period of periodlalosecondphase and a velocity amplitude of velocitylalosecondphase . During the triggering of the oscillation, bright field lines connect the flare with the filament. These only appear in the AIA 131 and 94 channels, indicating that they contain very hot plasma. The DEM analysis also confirms this result. Both indicate that a plasma of around 10 MK pushes the prominence from its south-eastern side, displacing it along the field lines and initiating the oscillation. From this evidence, the flare and not the preceding jet initiates the oscillation. The hot plasma from the flare escapes and flows into the filament channel structure. In this paper, we shed light on how flares can initiate the huge oscillations in filaments. We propose an explanation in which part of the post-flare loops reconnect with the filament channel's magnetic-field lines that host the prominence.