Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving objects does not work, when switching branches #842

Closed
WurstMitDurst opened this issue Jul 19, 2017 · 7 comments
Closed

Moving objects does not work, when switching branches #842

WurstMitDurst opened this issue Jul 19, 2017 · 7 comments
Labels
bug Something isn't working

Comments

@WurstMitDurst
Copy link

When the package assignment of an object has been changed, a branch switch does not work anymore.

Example with current version 1.37.5:

Preparation:

  • Create package zassign
  • Create package zassign_one (sub package of zassign)
  • Create package zassign_two (sub package of zassign)
  • Create Data Element zassign_element in package zassign_one

In abapGit do:

  • Commit the package zassign to a git repo with abapGit (branch master)
  • Create and checkout a new branch named reassignment

Now, do the following

  • In SE80 right click zassign_element -> 'Other Functions' -> 'Change Package Assignment'
  • Set zassign_two as new package
  • Commit this change to branch reassignment (It will remove zassign_element from zassign_one and add it to zassign_two in the repository)

Now the weird stuff happens (at least for my understanding):

  • Switch branch from reassignment to the original master branch. This will show you a popup, that zassign_element will be replaced. Click OK.
  • Check SE80 and you will see, that zassign_element has been moved back from zassign_two to zassign_one

The other way round does not work anymore:

  • Switch branch from master back to reassignment
  • Instead of automatically "move" zassign_element from zassign_one to zassign_two it stays in zassign_one and abapGit interprets this as a local change compared to the repository.

Is this considered a bug or is there something I do not understand?
Best regards,
Tobias

@larshp
Copy link
Member

larshp commented Jul 19, 2017

automatic moving between packages during pull is not implemented yet 😢

@larshp
Copy link
Member

larshp commented Jul 19, 2017

workaround is to move the objects manually, or uninstall and install all objects again

@WurstMitDurst
Copy link
Author

I have already feared, that this is a missing feature. Yes I definitely need to do something manually, here. Unfortunately in one of our projects, there is a big refactoring pending, which includes moving many objects from some packages to others. And refactoring in abap is always a pain :-D

@larshp
Copy link
Member

larshp commented Jul 20, 2017

tip: you can use transaction SE03 to do mass changes for objects, https://blogs.sap.com/2013/09/25/mass-tadir-changes-using-se03/

hope this will be implemented in abapGit sometime in the future, pull requests welcome

@larshp
Copy link
Member

larshp commented Jul 20, 2017

alternatively as a quick fix, perhaps make a small utility program outside of abapGit, which calls some of the abapGit functionality, that can be used to fix the package assignments

@WurstMitDurst
Copy link
Author

Wow thanks alot for the SE03 magic. I have already used this transaction to change the origin of some objects, but didn't know, that is offers an option for mass changes

@larshp
Copy link
Member

larshp commented Jul 22, 2018

Closing, use #1483

Workaround: Advanced -> Reset local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants