The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Assets - Set a default value when importing

Dirk Ronsmans
Community Champion
February 14, 2023

Hi,

I've looked in to this before but hopefully someone has figured out a way to do this in the meantime.

I have several imports going in to the same objectType and would like to be able to specify during the import what the source is.

In a CSV I can of course add a value as a column but I don't see a way to do this with for example an LDAP Import. Is there a way to either generate an attribute on the fly or set a default value somehow during/after import?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Melo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 23, 2023

Hi @Dirk Ronsmans ,

 "Is there a way to either generate an attribute on the fly or set a default value somehow during/after import?"

Using Asset automation, you can set default values on existing attributes.

e.g. When object created, if email ends with @mycompany (email domain) add "mycompany" to attribute Organization.

You'd need to define those before the import, and also, there is a limitation of 1 event and three pairs of conditions. Depending on your case, you may need more than one rule.

 

https://confluence.atlassian.com/servicemanagementserver/configuring-assets-automation-rules-1044784502.html

I hope that helps.

Thanks,

Melo

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 24, 2023

Yeah, I'd second this.

If you have a csv import, include a dummy column. 

If you have a database import, include a simliar dummy column in the sql selector.

Anything else left empty, can be assumed to be an LDAP import.

If you have 2 separate ldap imports and you want to identify ldap1 vs ldap2, then you'll need to use automation to fill in the empty data source attribute with an appropriate value based on some existing data differentiator  (maybe the distinguished name containing some keyword hopefully different for ldap1 vs ldap2)

Like Melo likes this
Admin _RKI
May 24, 2023

The function to specify "Default" values for imports is essential. Since with imports it cannot be ensured that e.g. a status is passed. Thus, no attributes can be set as "mandatory field", which should actually be treated as such. Because the import does not allow this! :-(

Like Artem Grotskyi likes this
0 votes
Riley Venable
Community Champion
February 14, 2023
You can specify a Data source field and Destination attribute to map with the Data Locator in the Import tab of the Object schema. You can also modify the default settings for this attribute mapping, including entering an IQL statement, a concatenator, a regular expression, and a Base 64 value.
Dirk Ronsmans
Community Champion
March 16, 2023

Hi @Riley Venable ,

i'm afraid i'm not fully following what you trying to explain.. 

You wouldn't happen to have a screenshot of the configuration or a link to some documentation about this?

TAGS
AUG Leaders

Atlassian Community Events