The Data Retention and Investigatory Powers Act 2014, an Act of Parliament, was passed in response to the Digital Rights Ireland ruling by the Court of Justice of the EU.  The Act’s primary provision is to restore to the Secretary of State the power to require communications service providers to retain for up to 12 months certain data generated or processed in the UK relating to telephony and Internet communications. This “communications data” – information about subscribers and their use of a communications service – is collected by many government agencies from UK Communications Service Providers using powers in Part 1 Chapter 2 of RIPA. The Act was also intended to put beyond doubt the extraterritorial effects of authorisations and requirements, so that they could be served on overseas service providers.
The Act also includes some limitations to the powers outlined in RIPA, including removing the power for obtaining warrants solely on the grounds of the UK’s economic interests (s.3). It also requires that the Independent Reviewer of Terrorism Legislation reports on the operation and regulation of investigatory powers by 1 May, 2015 (which was published in June 2015), and includes a ‘sunset clause’ providing for new legislation by the end of 2016.
A successful judicial challenge to DRIPA was lodged by the MPs David Davis and Tom Watson, which rendered DRIPA unlawful. This ‘disapplication’ was suspended until March 31, 2016, requiring new replacement legislation by that date, in effect bringing the sunset clause forward.
 Accessible at http://www.legislation.gov.uk/ukpga/2014/27/contents/enacted