BAQ Overwrite different authors

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?

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

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.

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

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?

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’

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

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.

1 Like

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?

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?

Is there an preferred way to do it? For instance, we had consultants during our implementation so many of our BAQs were written by them and the corresponding dashboards refer to them. I am now in a position to make small tweaks to their original BAQs.

Is it better to copy BAQ and make tweaks and then update associated dashboards? or
Change Author on existing BAQ and make tweaks - then no update of dashboard query.

Creating a copy (ie. newer version of the BAQ) maintains the original one. But comes with the down side of often having to make the Dashboard or Report from scratch, as you can’t simply change the BAQ either of those reference. At least not through the UI. There are tricks like exporting to XML, editing the XML, and re-importing. But they come with their own risks.

If it is a very minor tweak (like adding another column or tweaking table criteria), I’d take ownership of the BAQ and then make the changes. If it’s more than just a tweak, copy to new BAQ and start fresh.

1 Like

If only there was a development practice based on source control:thinking:

1 Like

Thanks! That’s kind of along the lines of what I was thinking.