jenkins-rest icon indicating copy to clipboard operation
jenkins-rest copied to clipboard

Fix For Folder Parser

Open traarttra opened this issue 1 year ago • 4 comments

https://github.com/cdancy/jenkins-rest/blob/246f5c29f59d5d3d947186943550b7c67570322f/src/main/java/com/cdancy/jenkins/rest/parsers/OptionalFolderPathParser.java#L45

Hello!

The following code needs to be removed

.append(FOLDER_NAME_PREFIX)

Because with him "view/Folder" -> "job/view/job/Folder/"

traarttra avatar May 20 '23 11:05 traarttra

@traarttra this is the first I've seen this pop and this code has been in place for quite a while now. Do you have an example on how this is failing for you?

cdancy avatar May 24 '23 14:05 cdancy

Sure! Job is stored in view in the following path: http://jenkins.host/jenkins/view/IB/view/Jobs%20In%20View/job/job_in_view/

For example, I get information about a job like this: image

After parsing the path, I get this output: image

This way I get incorrect parsing of the directory, since "job" is added before each slash

traarttra avatar May 24 '23 17:05 traarttra

@cdancy, hi! R U fix this problem or not?

traarttra avatar Mar 22 '24 21:03 traarttra

@traarttra I have not. If you'd like to send in a PR I'd be happy to review and look things over.

@martinda

cdancy avatar Mar 25 '24 14:03 cdancy