BAQ Overwrite different authors


(Chia Chang) #1

When importing a BAQ into a test environment using a .dbd file, does the BAQ overwrite the current BAQ if the authors are different? For example, if you exported the BAQ under author as ‘Joe’ and then overwrite the BAQ in the test environment as ‘Jim’, is this possible? I thought it was but for somehow the BAQ is not being overwritten upon importing the .dbd file and BAQ. Does the system allow overwriting a BAQ with the same ID but different author?


(Chris Conn) #2

I do believe the author will show as the importer.Also, the ID must be unique


(Chia Chang) #3

What if the ID is not unique, we would expect it to overwrite the BAQ with the author of the importer? Somehow the BAQ is not being overwritten since we validated it by reviewing the Criteria did not update.


(Calvin Krusen) #4

Does E9 have the “Change author” function? Its in the Actions menu of E10

image

If so, do the following:

  1. Open the BAQ in Production (or where ever you are trying to import it into)
  2. Change the Author to your current user
  3. Import the BAQ that was exported from the test environment - confirming overwriting existing BAQ

(Chia Chang) #5

Why do I need to change authors if I am overwriting the old BAQ from a new author? Doesn’t this (the author) automatically happen when importing and overwriting an existing BAQ?


(Calvin Krusen) #6

In E10, you cant even change a BAQ written by someone else. Well, you can… If you save it as a different BAQ - using either Export followed by an Import, or Copy Query (which will make you the author of the new query). But then it’s really not the same BAQ.

The ‘Change Author’ gets around this.

In the pict below, the BAQ was imported by user ‘ex_ckrusen’, while I’m trying to edit it as user ‘manager’


(Calvin Krusen) #7

FWIW - the QueryHdr table does not use the user/author as a primary index. So it’s not as much a data consistency thing, as it is a security thing.

I have Admin rights, so I’m not sure what options “regular users” have for changing the author of a BAQ


(Sue Nielsen) #8

The author (DcdUserID) is part of the primary index for the Export table in 9.05.701. On the subject of changing authors…if the BAQ is a cross-company BAQ make sure the new author has cross-company BAQ permissions BEFORE changing the author. If you don’t it will create a BAQ (same name) for the 2nd company that can’t be deleted.


(Calvin Krusen) #9

So the user doing the importing can overwrite a BAQ authored by another, as long as the author of the imported BAQ is the same as the author of the BAQ being overwritten?

  1. BAQ XYZ, by author jschmoe, exists in Production db
  2. User jblow exports BAQ XYZ
  3. User jblow imports BAQ XYZ into the Test db (assume BAQ didn’t exist in test db)
    Is the author of the BAQ in the Test db kept as jschmoe, or changed to jblow (the user doing the importing) ??
  4. Assuming the BAQ author remained jschmoe, user jblow takes ownership (changes author to himself) in the Test db.
  5. In Test db, user jblow edits the BAQ, and saves it.
  6. In Test db, user changes the author to jschmoe and exports it. (I assume the author remains jschmoe)
  7. In Production db, user jblow imports the BAQ.

Would that work? My thought is that step 7 would fail, as the user doing the import doesn’t match the current author. Or does it have to just be the author in the export that needs to match the current author?


(Chia Chang) #10

I believe in step #3, if you import it with the correct security rights, it will overwrite the BAQ with new author. The issue we thought we were seeing was that the author did not change upon import which resulted in the BAQ criteria not reflecting the new changes. This lead us to believe that the BAQ was not overwritten since the author stayed the same upon import.

Even so, have you seen it where you made a change to the BAQ but upon importing, those changes did not stay or update?