No results for SIL command userRoles

Ingo Bultschnieder April 10, 2024

I want to get a list of roles of a user in a sil script. No matter if i use userRoles("ABC","The Name") or userRoles("ABC","the.name@domain.com") - i always get an empty result. When i try userRoles("ABC","theAccountID") i get an exception: 

Exception while executing SIL program '[inline source]': [SIL Error on line: x, column: y] null
When i try usersInRole("ABC","Service Desk Team") for example it works fine and i get the list of accountIDs including the one i was looking for.  Any ideas?

2 answers

1 vote
Anna Hryhoruk _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.
April 11, 2024

Hello @Ingo Bultschnieder 

Thank you for sharing this information. At Appfire, we are actively addressing community inquiries and striving to offer assistance for our applications.
I was able to replicate this issue and indeed, this looks like a bug. I have already created a bug ticket for the development team, and it should be fixed in the current development sprint. Since our backlog is not public, unfortunately, I cannot share that ticket with you. But if you have any additional questions or wish to receive updates, you can create a support ticket here, and the support team will keep you informed once it has been addressed.

I want to thank you for taking the time to share this issue. Your findings are helping us improve our product, and we greatly appreciate your contribution.

Best regards,
Anna

0 votes
Anna Hryhoruk _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.
April 17, 2024

Hello @Ingo Bultschnieder ,

I wanted to inform you that the latest version of the Power Scripts app, which includes the solution for the previously mentioned issue, was released today. Give it a try, and if you encounter any other issues, feel free to reach out to the Appfire team . 

Have a good day!
Anna

Ingo Bultschnieder April 17, 2024

Hi @Anna Hryhoruk _Appfire_ ,

thanks for the info. I don't get an exception anymore when i call userRoles with "theAccountID". Now i get an empty result in all three cases. So not much better than before.

Anna Hryhoruk _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.
April 17, 2024

You are correct @Ingo Bultschnieder . I was in a rush to share some positive news, but regrettably, I did not re-test it before sharing it with you, for which I apologize. The bug causing NPE has been addressed and documented in the release notes of the latest version. However, the issue with empty output was not addressed yet. We have a separate ticket for that, and it should be resolved shortly. Once again, my apologies for the incorrect information. Hopefully, that part will be fixed soon as well.

Best Regards,
Anna

Anna Hryhoruk _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.
April 23, 2024

Hello @Ingo Bultschnieder ,

That's me again! 😊 I'm excited to share that a new version of the app has been released. Alongside various fixes and improvements, this release includes a fix for the userRoles routine.

To utilize it, please ensure that you specify the user ID as the parameter, rather than using the username or email.

It may be smth like this: 

string [] user_info = getUserByFullName("anna h");
return userRoles("HR", user_info[0]);

The output: 

Service Desk Team|Administrators

 Hope this helps!


However, if you notice any other issues in the future, please do not hesitate to contact our team via the portal .

Ingo Bultschnieder April 23, 2024

Yes, it works now, thanks!

Like Anna Hryhoruk _Appfire_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events