vic
September 18, 2020, 12:21pm
1
Infos:
Used Zammad version: 3.4
Used Zammad installation source: package
Operating system: Ubuntu 18.04
Browser + version: Firefox 80
Problem
In the user object, I just created a new select field called “Title” that I would wish to show on the very top of the customer creation form.
I changed the position in the shell using the commands:
ObjectManager::Attribute.find_by(display:'Title').update(position:199)
I chose the number 199 because the first field is “Firstname” with the position 200.
My “Title” field moved up from the bottom, indeed, but it is still only 5th in the list, right below Organization. All the fields above (Firstname, Lastname, Email, Organization) have position values that are higher than 199.
Why is it not moving above “Firstname”? Is there anything else I can do to influence that?
Took me quite a whilte.
At the moment there’s no way to move attributes above these default attributes (user context):
firstname
lastname
organization
email address
I couldn’t find the correct part in the code, however, this gave me the clue that this is “intended” as of now.
# check if value for _id exists
name = attributeName
nameNew = name.substr(0, name.length - 3)
if nameNew of user
name = nameNew
# add to show if value exists
if (user[name] || attributeConfig.tag is 'richtext') && attributeConfig.shown
# do not show firstname and lastname / already show via diplayName()
if name isnt 'firstname' && name isnt 'lastname' && name isnt 'organization'
userData.push attributeConfig
@html App.view('user_profile/object')(
user: user
userData: userData
)
@$('[contenteditable]').ce({
mode: 'textonly'
Personally I don’t see the reason, there may be a good one.
Not sure if this completely qualifies as a bug or if it’s an enhancement.
Maybe @thorsteneckel can give us a small insight if he finds time. As I said, there might be a reason.
Right now the only (non update safe) way would to change your code - however, I can’t assist you with that.
Further input from my end - as I just stumbled upon this issue:
opened 12:21PM - 05 Feb 17 UTC
Infos:
Used Zammad version: 1.1.1-1483606242.9b40d24.xenial
Operating system: Ubuntu 16.04
Browser + version: Google Chrome 56.0.2924.87 (64-bit)
T#1076062
Expected behavior:
Change attribute order via drag-and-drop or something similar
Actual...
enhancement
proposal
I will update above mentioned issue to also cover this use case.
So no need to create a new one.
1 Like
system
Closed
January 22, 2021, 12:15pm
4
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.