Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update user properties automatically

Sanu Soman
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 Leaders.
March 17, 2014

Hi All,

I'm looking for to automatically update user's proprties in jira (LDAP integrated) once they login/created account in jira.

Is this possible?

Thanks,

Sanu P Soman

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Andris Grinbergs
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 Leaders.
April 15, 2014

I use nightly SQL which populates user's properties from LDAP to Jira DB. Altho - jira restart is needed...

Sanu Soman
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 Leaders.
April 15, 2014

nightly SQL?

Andris Grinbergs
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 Leaders.
April 15, 2014

It's actually PERL script which is called every night - it retrieves info from LDAP and pushes it with SQL to Jira DB.

Andris Grinbergs
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 Leaders.
April 15, 2014

I use this SQL to get list of users which have have missing user property:

select

name

from

external_entities

where

external_entities.name not in

(

select

external_entities.name

from

propertystring,

propertyentry,

external_entities

where

propertystring.id=propertyentry.id and

external_entities.id=propertyentry.entity_id and

propertyentry.property_key="jira.meta.UserCustomID"

)

Then cycle those users, get value for each with $ldap->search

And write found value to Jira DB:

INSERT INTO propertystring (id,propertyvalue) VALUES (\@newID, \"$UserCustomID\");";

And update sequence after that:

UPDATE SEQUENCE_VALUE_ITEM SET SEQ_ID=(SELECT (((max(id)+20) div 100)+1)*100 from propertyentry) where SEQ_NAME=\"OSPropertyEntry\";";

0 votes
Boris Georgiev _Appfire_
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 Leaders.
March 17, 2014

You can implement listener com.atlassian.jira.event.user.UserEventListener and then set user properties in the com.atlassian.jira.event.listeners.mail.MailListener.userSignup(UserEvent)

Sanu Soman
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 Leaders.
April 15, 2014

Is it possible to share some sample script on this?

TAGS
AUG Leaders

Atlassian Community Events