[NAS-2676] The regexp used by Reporting.getMetadataCDXRecordsForJob(jobID) in NetarchiveSuite is wrong Created: 05/Oct/17  Updated: 24/Apr/18  Resolved: 16/Nov/17

Status: Closed
Project: NetarchiveSuite
Component/s: GUI
Affects Version/s: 5.2.2
Fix Version/s: 5.4

Type: Bug Priority: Minor
Reporter: Søren Vejrup Carlsen (Inactive) Assignee: Søren Vejrup Carlsen (Inactive)
Resolution: Fixed  
Labels: None
Remaining Estimate: Not Specified
Time Spent: 0.25h
Original Estimate: Not Specified

Issue Links:
Spawned
spawned NAS-2726 The methods in dk.netarkivet.viewerpr... Resolved
Sprint: NAS 5.4

 Description   

The regexp used by Reporting.getMetadataCDXRecordsForJob(jobID) in NetarchiveSuite 5.2.2
is wrong.
With jobID=15 it also retrieves data for all jobs with a 15 prefix.
It affects 5.2.2, and maybe also later versions.



 Comments   
Comment by Søren Vejrup Carlsen (Inactive) [ 18/Oct/17 ]

I have now updated the applied regexp to

jobid +  metadatafile_suffix

And updated the unittests to actually test it.

Comment by Søren Vejrup Carlsen (Inactive) [ 17/Oct/17 ]

It should be just

jobid +  metadatafile_suffix

or maybe (in the case of BNF)

harvestprefix +  metadatafile_suffix
Comment by Søren Vejrup Carlsen (Inactive) [ 17/Oct/17 ]

We use a wrong pattern for looking up metadata files.
The current pattern is

 
".*" + jobid + ".*" + metadatafile_suffix

where

 
metadatafile_suffix = "-metadata-[0-9]+\\.(w)?arc(\\.gz)?";
Generated at Fri Apr 26 18:59:36 CEST 2024 using Jira 9.4.15#940015-sha1:bdaa9cbecfb6791ea579749728cab771f0dfe90b.