     
     override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
         
-        if let dest = segue.destination as? JobViewController,
-            segue.identifier == Constants.Identifiers.showJobSegue,
+        if  segue.identifier == Constants.Identifiers.showJobSegue,
             let jobCell = sender as? UITableViewCell,
             let indexPath = tableView.indexPath(for: jobCell),
-            let jobResult = currentView?.jobResults[indexPath.row],
-            case let JobListResult.job(job) = jobResult{
-            
-            dest.job = job
-            dest.account = account
-        }
-        else if let dest = segue.destination as? JobViewController, segue.identifier == Constants.Identifiers.showJobSegue, let job = sender as? Job{
-            dest.job = job
-            dest.account = account
+            let jobResult = currentView?.jobResults[indexPath.row]{
+            
+            prepare(vc: segue.destination, for: jobResult)
+        }
+        else if segue.identifier == Constants.Identifiers.showJobSegue, let jobResult = sender as? JobListResult{
+            prepare(vc: segue.destination, for: jobResult)
         }
         else if let dest = segue.destination as? BuildQueueTableViewController, segue.identifier == Constants.Identifiers.showBuildQueueSegue{
             dest.account = account

        else if let dest = segue.destination as? JenkinsInformationTableViewController, segue.identifier == Constants.Identifiers.showJenkinsSegue{
            dest.account = account
        }
        else if let dest = segue.destination as? JobsTableViewController, segue.identifier == Constants.Identifiers.showFolderSegue,
                let cell = sender as? UITableViewCell,
                let path = tableView.indexPath(for: cell),
                let jobResult = currentView?.jobResults[path.row],
                case let JobListResult.folder(folder) = jobResult,
                let account = account{
            
            dest.account = account
            dest.userRequest = UserRequest.userRequestForJobList(account: account, requestUrl: folder.url)
            dest.sections = [sections.lazy.last!]
            dest.title = folder.name
        }
    }
    
    //MARK: - Tableview datasource and delegate

        return jobs?.allJobsView?.jobResults.map({ (job) -> Searchable in
            return Searchable(searchString: job.name, data: job as AnyObject, action: {
                self.searchController?.dismiss(animated: true, completion: nil)
                
                let identifier: String!
                
                switch job{
                    case .folder(_):
                        identifier = Constants.Identifiers.showFolderSegue
                    case .job(_):
                        identifier = Constants.Identifiers.showJobSegue
                }
                
                self.performSegue(withIdentifier: identifier, sender: job)
            })
        }) ?? []
    }
