Set assignee based on user properties via JMWE add-on

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

Hi all!

Let me set up the stage first, before asking :)

  • As a user
  • I want all my created issues to be assigned to my manager
  • so that he/she can evaluate them

 

How I am currently trying to do it is by using JMWE.

  • I've already added a user property, "escalation-point", with value the account ID of the reporter's "manager".
  • Then via the workflow I created a post function "The value of field Assignee will be set to the value of the user's escalation-point property.
    Run as add-on user."

However this doesn't work. I've also tried to place the string of the manager, but this didn't help either. I've tested on the "description" field, and every value I've placed is correct. I'm assuming that the value of the property, being the assignee, must be of a proper format.

Any advices?

Much appreciated,

Alex

2 answers

1 accepted

1 vote
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

Hi Alex,

in the user entity property editor, did you prefix the accountId with "accountId:"? For example:

image.png

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

@David Fischer hi and thank you for your swift reply!

That in deed did the trick. Much appreciated and obliged!

However, prior of asking you this specific question, I've looked up on your documentation (to be exact this page, and this) but unfortunately I didn't see anything about the use of prefixes. Could you point me please to the right URL in order to take a closer look at all the available prefixes?

Cheers,

Alex

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

This is indeed not documented as such. However, if you use, say, a Set Field Value post-function to set the Assignee field, you'll notice in the "Expected Value" that the accountId should be prefixed with "accountId:", and that accessing issue.fields.assignee.accountId returns the accountId prefixed the same way.

Generally, JMWE prefixes accountIds in order to differentiate them from the now-extinct "userKeys" that used to identify users in Jira Cloud. Something that Atlassian should have done when they introduced accountIds...

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

So when I'm getting similar error, I should try and use prefixes?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

It really depends where, but yes, accountIds should have a prefix when used as values in JMWE.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2020

I will assume that prefixes are not limited to accountids, right? Do you think that you will find the time to update the documentation of your wonderful plugin? It could really open up lots of doors! :)

Thank you once again for your help!

Kind regards,

Alex

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2020

Prefixes are limited to accountIds. Again, this is something we had to introduce when Atlassian implemented their GDPR compliance and switched from userKeys to accountIds. But I suppose we could now do away with them, since userKeys are now a thing of the past. We'll look into it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events