create a script runner function that is manager of user and reports directly to manager.
Hello,
Where information about managers is stored?
@Alexey Matveev Its stored in Oracle database thats HR database fyi.
As a JIRA user I need ScriptRunner functions that will return direct reports and managers of a user based on information from our HR database so I can use them in scripts and JQL.
a function returning manager of an user exists and returns the same person as Oracle database.
a function returning direct reports of an user exists and returns the same list as Oracle Database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would not do it as a JQL functin. The performance will be very low. You should do it as a scripted field. Then you can choose on the scripted field in JQL function. You can read more here about scripted field
https://scriptrunner.adaptavist.com/5.0.4/jira/scripted-fields.html
You can query database like this
https://scriptrunner.adaptavist.com/latest/jira/recipes/misc/connecting-to-databases.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thanos Batagiannis _Adaptavist_ could you please point me to a script that can help me with this issue? Please and thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Vladimir Sid
@Alexey Matveev is absolutely right. The links to the documentation that he posted are a good start.
Let me know if you get stuck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thanos Batagiannis _Adaptavist_ I would need your suggestion on how to write the script or a code snippet or template for user picker (for example user1) and return the result for user1's immediate manager (example: user2). As i started following the link I can find all other sorts of very useful info but not relevant to my query. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.