Bug report #14732

@user_full_name and @user_account_name causes Crashes

Added by Ayodele Adeyemo over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Andreas Neumann
Category:PyQGIS Console
Affected QGIS version:2.14.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:22690

Description

I am currently working on a QGIS 2.14 and i am trying to us the built in variables to populate the user field with the system name of the user logging making the edit on the feature attribute. I have used the UUID generator and it has proved helpful but at every time I try to use either of @user_full_name or @user_account_name I get a crash dump.

We are currently working on an open source migration meaning that we are moving our products from proprietary to open source and this functionality is a very important one for us because we work as a team and we need to track who is making changes to our data within the organization.

Thanks ahead,
Ayodele Adeyemo

Setting_to__user_full_name.PNG - Setting the Edit Widget properties Display Expression to @user_ful_name (87.5 KB) Ayodele Adeyemo, 2016-04-26 12:26 AM

Crash_Dump.PNG - Regular Crash Dump (25.6 KB) Ayodele Adeyemo, 2016-04-26 12:26 AM

Associated revisions

Revision eed4ee64
Added by Nyall Dawson over 3 years ago

Fix crash in relation reference widget (fix #14732)

Revision c7998127
Added by Nyall Dawson over 3 years ago

Fix crash in relation reference widget (fix #14732)

(cherry-picked from eed4ee)

History

#1 Updated by Nyall Dawson over 3 years ago

  • Status changed from Open to Closed

#2 Updated by Nyall Dawson over 3 years ago

I've fixed the crash, but please note that this WILL NOT do what you are trying to do. The relation reference widget expression is just a formatting change, it will NOT save these values to the database. In addition it will always show the current user for ALL features.

What you are looking for is #12492 - but that's not implemented yet.

#3 Updated by Ayodele Adeyemo over 3 years ago

  • % Done changed from 0 to 10
  • Status changed from Closed to Reopened

Nyall Dawson wrote:

I've fixed the crash, but please note that this WILL NOT do what you are trying to do. The relation reference widget expression is just a formatting change, it will NOT save these values to the database. In addition it will always show the current user for ALL features.

What you are looking for is #12492 - but that's not implemented yet.

Please i dont understand what you are saying about it not saving into the the database( Do you mean the table?). Basically what I am trying to do is to do something like what the UUID generator does for its assigned field with the @user_full_name. Not necessarily through the relation reference widget expression. I will appreciate any help on this please.

Thanks for the support.

#4 Updated by Nyall Dawson over 3 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF