- This topic has 5 replies, 2 voices, and was last updated 4 months, 3 weeks ago by
February 6, 2020 at 7:33 pm #202298ParticipantTopics: 1Replies: 1Points: 14Rank: Member
this is my first post. I am beginner in PowerShell and either programming.
I have a task to build a PS tool to revoke Jira licenses (Server, not Cloud) of inactive users depending of days since their last login and send mail notification to project leaders of projects where these revoked users were assigned.
Using SQL and API I get all information which I need:
– inactive users,
– users’s projects,
– project leaders and their mails
But I can’t link these all lists, arrays, objects and add to this some logic to build complete solution.
Which control flows, conditional statements comes to your mind in this case? Any help would be appreciated.
February 6, 2020 at 7:49 pm #202304
There are already some pre-build Jira Powershell Modules, have you looked at them?
February 6, 2020 at 8:18 pm #202313ParticipantTopics: 1Replies: 1Points: 14Rank: Member
Yes, I know this module. I even use in my script to kick-off user from group 🙂 As I said I have all data to get this thing done.
I need solution to second part. Having all this information I don’t know how to:
– link mail notification to project leaders, by list of revoked users.
- user john.doe was inactive for more than 30 days
- he was assigned to Foo project
- Foo project leader is jane.doe
- send e-mail to jane.doe that john’s license was revoked and he is member of your Foo project
User can be assigned in more than one project. Each project leader should receive that mail.
February 6, 2020 at 9:55 pm #202322
That is specific question to the Jira community rather than a Powershell question, so if you have not you may want to find a forum dedicated to the JiraPS module. As far as how to relating data, I would find a Project that John Smith is assigned to typically and get the data for both (Project + User) to see how the application is linking objects. There is a published schema that shows you how data is linked in the database, but the API may be providing information differently:
February 7, 2020 at 1:41 pm #202412
Take a look at the data model:
It will explain how data is joined in the database.
February 7, 2020 at 8:03 pm #202490
Take a look at the schema:
- The topic ‘Jira Module’ is closed to new replies.