Need to move multiple folders that contain items and maintain nested hierarchy
hosted)
-> Not sure, I think 2014
2. What browser does this issue occur on?
-> Firefox 43
3. How many users are experiencing this problem?
-> Probably everyone
4. What steps have you taken to try to resolve it?
-> Not using the method described here to move multiple folders that contain
items > https://community.jamasoftware.com/jama/topics/moving-items-in-explorer-view,
moving items one at a time in the explorer tree.
I have done exactly what was described in the solution stated in the answer
to the question in the link above. I needed to move several hundred folders,
each containing one or more test cases. Instead of keeping the folder structure
when moving, Jama treated each item (folders, test cases - all 1200 of them) as
individual items. This has created a mess where I have to return all test cases
to their correct folder - It seems there is no simple "undo" for
this.
This would have been avoided if it had been possible to select
multiple items in the explorer tree.
Comments
-
Stuart, I'm checking in on the expected behavior. The issue is that in list view items aren't displayed according to tree hierarchy, but heading. However, heading doesn't define how items are nested. So I can see that this might be expected behavior (although not desired).0
-
I have confirmed that while this isn't ideal behavior, it is working as initially designed. But as we thinking about improving taxonomy in Jama, we should consider this issue. Because it's not a bug but it is something you would like to see changed in Jama, I've updated this post from a "Problem" to an "Idea." Thanks for bringing this up, Stuart, and I'm sorry that you've inadvertently made a mess of you hierarchy.0
-
Thanks for your reply, Kristina. Whilst I do understand (in hindsight) that this behaviour could have been predicted, I cannot think of any usecases where this behaviour would be favourable. I do hope this idea has enough priority to be included in a release very soon! I am now trying to find a fast way to return the order I had previously (any tips welcome).0
-
I am trying to return the test cases to their correct folder using the Excel Export roundtrip. I am able to export to Excel and rearrange them in the correct order, colour only the folders to mark them as parent and list the belonging test case(s) in the row(s) underneath.
The problem now is the "round-trip import". I get the error:
Found shared references to a collection: com.jamasoftware.contour.domain.ContourItemImpl.versions; nested exception is org.hibernate.HibernateException: Found shared references to a collection: com.jamasoftware.contour.domain.ContourItemImpl.versions
I don't understand what that means and why it is not possible to update the hierarchy using the roundtrip import feature, although there is the option at step 3 of the import. Is specifically what I am trying to do not supported by Jama?
0 -
Stuart, that was really good thinking to try to use roundtrip to resolve your issue, as it's often the silver bullet. In terms of what you're trying to do being specifically not supported, yes, you're mostly right there. First, Roundtrip doesn't take any location information into account. It really only cares about the backend ID (API ID) and version number to see if the collision rules need to be applied. The items in the document could be from a filter and sorted by name alphabetically into the excel document. The roundtrip of the items back in only has to match type—you could start the import into a Set that doesn't contain any of the items so the orientation of the data in the file is meaningless.
Second, if there is no rearrangement needing to be made but just an unflattening of the hierarchy, this method should work. However, you may run into SOS-BUG-330, which flattens hierarchy within folders (however, one level should be okay) when you import via Roundtrip.
I don't have any workarounds—I think the only thing you can do is rearrange within the Explorer Tree itself.0 -
Hi Kristina, indeed all I need is the unflattening of the hierarchy, I absolutely have to have the test cases inside their correct folder (yes, just working with one level). I have been trying several methods with the roundtrip (including manipulating the Heading Number and Has Children TRUE/FALSE). Can you explain the method where you mention "if there is no rearrangement needing to be made but just an unflattening of the hierarchy, this method should work."0
-
Stuart, I understand and am sorry that what seems to be a simple need doesn't have a quick resolution. First, when it comes to Roundtrip, I would not manipulate any of the system-defined fields (such as parent or heading)—this will not change anything and may introduce issues. Roundtrip is a very particular function and it is best to not alter any of these values. When I mentioned "if there is no rearrangement needing to be made but just an unflattening of the hierarchy, this method should work" is based on the rules applied to just importing via Excel:
1. Start with a List View (I imagine at the level of Test Case Component or Folder) that displays all the cases you're concerned with. The items need to be in the correct order here. You cannot rearrange the order in Excel.
2. Export using the Excel Export for Roundtrip.
3. In Excel, indicate your one level of hierarchy by highlighting the Name cells of the folders. If you nest things further than this, you will need to use both highlighting and indentation, but that's where SOS-BUG-330 would affect you by flattening the hierarchy on import. So you have to choose one or the other.
4. Import using the "color cells indicate folder or parent item" option.
This is all taking into account how the Import process should react to your choices. However, as mentioned before, Roundtrip was not designed to take any location information into account. It is quite possible that the error you received is not the result of a bug, but a really unfriendly error message that should instead tell you your import does not follow correct formatting guidelines. I can look further into that and file a bug for either the behavior or the error message. However, that will provide no immediate resolution, and I think the only way to assure you get back in working order is to manually rearrange the items in the Explorer Tree.0 -
Hi Kristina, I am afraid because of the existing tracing/relationships, I cannot do a new import of test cases. Furthermore, that will introduce new test case IDs and I am not sure of the impact that could have. I will just have to bite the bullet and re-arrange the items manually in the explorer tree. Thank you for your help and suggestions. Again, I hope there will be something in the next release of Jama to cover the issues I have encountered.
Best regards!
Stuart0 -
I helped Stuart with the approach described here:
https://community.jamasoftware.com/jama/topics/how-to-move-items-with-rest0 -
Harald, you are my hero.0
-
Stuart, I think you've made good points here, so thank you for talking through this. I'm glad Harald was able to help.0
-
Just to add one last point on this topic (for future reference).
I just tried to drag only the folder-item from the Main View to a folder in the Explorer Tree and guess what, it takes its child(ren) items along with it automatically!
So here is what I recommend you do when you need to move multiple folders from one place to another:
Try this method first with only one folder to check that the behaviour is correct/desired.
1) Open the location of the folders in the Main View.
2) Select folders you would like to move - be careful when using the filter to select all folders, your hierarchy will be compromised if it is more than 1 level deep.
3) Drag the selected folder(s) to desired folder in the Explorer Tree.This also worked for me when the parent folder being moved contains more folders - the folder hierarchy inside was also kept.
0 -
Interesting. Good catch, Stuart!0
-
Hi Kristina,
Have there been any developments on this front? Preserving the hierarchy would be really useful for many of us, it's definitely not expected to get the hierarchy flattened.
Stuart's workaround is really neat, but unfortunately I have a slightly different situation where we're using item-sub-item hierarchy and hence cannot filter by folder.
REST is something we could do internally but I'd like to recommend a solution that our user base can do on their own so they're not coming to us with these requests.
Thanks,
Ed0