It's all about the answers!

Ask a question

Is it possible to create a link to a file for a specific item id plus state?


akshay p (153) | asked Aug 16, 5:36 a.m.
edited Aug 16, 7:06 a.m. by Ralph Schoon (55.3k23642)

Is it possible to create a link to a file for a specific item id plus state?

 

Currently we can create a link in alm for a file/item id.

 

Can we add extra parameter &stateId= and create a link

 

For example : i have an item a.c in state (2)/version 2. I can only view the latest file that is version 2 in alm browser link.

 

is it possible to view version 1 by adding state id as additioonal parameter in the above link.

 

 

We also tried to do that however, no matter what we give as state, it alwys redirects to latest version of the file.

 

below is the link to a file i.e. a.c version 2

....#action=com.ibm.team.scm.browseElement&workspaceItemId=__tJbwL5UEemfxMTXV99IQA&componentItemId=__uyagr5UEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_IK3O8L5VEem7SNNawz5Oxg

 

if i add a state id as a suffix with state as (1) or (2), it is making no difference

....#action=com.ibm.team.scm.browseElement&workspaceItemId=__tJbwL5UEemfxMTXV99IQA&componentItemId=__uyagr5UEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_IK3O8L5VEem7SNNawz5Oxg&StateId=abc

....#action=com.ibm.team.scm.browseElement&workspaceItemId=__tJbwL5UEemfxMTXV99IQA&componentItemId=__uyagr5UEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_IK3O8L5VEem7SNNawz5Oxg&StateId=xyz

 

it will always redirect to ....#action=com.ibm.team.scm.browseElement&workspaceItemId=__tJbwL5UEemfxMTXV99IQA&componentItemId=__uyagr5UEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_IK3O8L5VEem7SNNawz5Oxg

Accepted answer


permanent link
David Lafreniere (4.2k7) | answered Aug 19, 3:17 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Try this URL and see if it does what you want:

https://<YOUR_JAZZ_HOST>:9443/jazz/web/projects/ProjectA#action=com.ibm.team.scm.viewChangeSetItem&componentItemId=<COMPONENT_UUID>&itemType=com.ibm.team.filesystem.FileItem&itemId=<FILE_UUID>&stateId=<FILE_STATE_UUID>

akshay p selected this answer as the correct answer

Comments
akshay p commented Aug 20, 6:51 a.m.

Thank you for the response, this is working ..

One other answer



permanent link
Geoffrey Clemm (29.2k23035) | answered Aug 16, 5:44 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 20, 11:07 a.m.

Comments
akshay p commented Aug 19, 3:48 a.m.
In Snapshot, as usually only one version of a file will be present, it does not make a difference.Even if we add an extra parameter state id in front of snapshot or stream, it is not making a difference.
For example :
...#action=com.ibm.team.scm.browseElement&snapshotItemId=_CcmutsJSEemfxMTXV99IQA&componentItemId=_Ptr1IsJQEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_n5i8MMJQEemb6aHkLDp4cg&stateId=_rFCn1cJQEemfxMTXV99IQA
       
       ...#action=com.ibm.team.scm.browseElement&snapshotItemId=_CcmutsJSEemfxMTXV99IQA&componentItemId=_Ptr1IsJQEemfxMTXV99IQA&itemType=com.ibm.team.filesystem.FileItem&itemId=_n5i8MMJQEemb6aHkLDp4cg&stateId=_AbMGBMJREemfxMTXV99IQA
Here state id are different , but when we click it will always point to a same file present in Snapshot.

Same for streams and snapshots, link always point to a latest version of the file and does not get affected if we add state id as a parameter.

Your answer


Register or to post your answer.