Jira Module

Welcome Forums General PowerShell Q&A Jira Module

Viewing 5 reply threads
  • Author
    Posts
    • #202298
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      Hi,
      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.

    • #202304
      Participant
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero

      There are already some pre-build Jira Powershell Modules, have you looked at them?

      AtlassianPS – A new home for JiraPS (formerly PSJira) from PowerShell


      https://github.com/AtlassianPS

    • #202313
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: 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.

      1. user john.doe was inactive for more than 30 days
      2. he was assigned to Foo project
      3. Foo project leader is jane.doe
      4. 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.

    • #202322
      Participant
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero

      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:

      https://developer.atlassian.com/server/jira/platform/database-schema/

    • #202412
      Participant
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero

      Take a look at the data model:

      https://developer.atlassian.com/server/jira/platform/database-schema/

      It will explain how data is joined in the database.

    • #202490
      Participant
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero
Viewing 5 reply threads
  • The topic ‘Jira Module’ is closed to new replies.