Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Separate project components by delimiter (-) script

Yogesh Mude
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2020

Team,

I our project we have many components and we have created the versions like componentName-version eg. Internet-1.1.0, Engine-status-1.0

So we have many components with the same name like Internet but the versions are different like Internet-1.1.0, Internet-1.1.1, Internet-1.2.0, Engine-status-1.0, Engine-status-1.1.0, Engine-status-1.1.2 etc..

I am able to fetch the components and getting collection of project components but now i want to split the component and version by delimiter "-" and the latest released version needs to archive based on components.

 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2020

I understand that you want to separate or split the names of something, but

Are you trying to split the names of components or versions?

Why?  You have not told us what you want to do with the split bits of the names.

I can write you a couple of lines that will give you strings like "internet" "1.1.0", but what do you want to actually do with those strings?

Yogesh Mude
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2020

HI @Nic Brough -Adaptavist- 

Actually, in our project, there are a bunch of components that are there and we are managing the version based on the components.

I mean to say.. for each component we have multiple versions. Our requirement is we want to archive the version which is older than two years but based on the component.

Because each component has multiple versions and the version name is like <componentname-version>.

eg. Internet-1.1.0

Let say in component Internet we have four versions like Internet-1.1.0, Internet-1.1.1, Internet-1.2.0,, Internet-1.2.1 the latest version Internet-1.2.1 should not be archive but the other three versions can be archived.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 17, 2020

Ok, but that doesn't tell us what you want to do with the strings you're going to get, or whether the names are currently versions or components.

Suggest an answer

Log in or Sign up to answer