JIRA Automation. How to Change accountID rules to UPN?

Tony Montana
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 19, 2024

Hello. We changed our logins from sAMAccountName (login) to UPN (login@domain.com). But I have rules, for example, {issue.Request Participants.accountID} recieved names in login (sAMA type). But, what I need to change for UPN names. cause I have errors.

1 answer

0 votes
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2024

Hi @Tony Montana 

Not sure I understand the use case here, perhaps you can add an example to explain the use case?

Tony Montana
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.
May 11, 2024

Which examples?

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2024

Can you add more details to what is expected?

Not aware sAMAccountName or upn either, what is the expectation from the automation?

Tony Montana
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.
May 12, 2024

@Jehan BhathenaReal bro.

UPN vs SAMACCOUNTNAME

https://gist.github.com/nordineb/c6b039d7d56ae5d7f3af36bb098b3c3a

 

What expected. AS I said.
- We changed our logins from sAMAccountName (login) to UPN (login@domain.com).
- But I have rules, for example, {issue.Request Participants.accountID}
This smart thing uses SAM login attribute - format LOGIN

- I need smart expression for UPN - format LOGIN@DOMAIN.NET

Because, rules can't run.

Action details:

Issue condition

The following issues passed:
AC-289

Re-fetch issue data

Issue data re-fetched from server successfully.

Edit issue

Error editing issues
AC-289 (Could not find usernames: tony, john, presley (customfield_10000))
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2024

Got it. 

About the Edit Issue Error, assuming the custom field is a user drop down, you can try to create smart value with the user name appended with the domain (provided the domain is consistent). 

Smart value function "concat(String str)" Should be of use here. Ref https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

Tony Montana
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.
May 12, 2024

This isn't cloud

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2024

Suggest an answer

Log in or Sign up to answer