Send notification to users in a user picker field

Hello,

I need to send email to users who are in a multiply user picker filed. I used this API POST /rest/api/2/issue/{issueIdOrKey}/notify
but it brings me an error attached ((Approvers is several user picker field in JIRA, not in AD)

Also how can I get the {issueIdOrKey} of an issue type? I need to send notifications to a specific issue type requests automatically, depended on a date in the request. In case I am going to the wrong direction, please help to find the solution.

Hello @m.hamamjyan,

If I understood it correctly, Approvers is a user picker and not an actual group found in Administration > User Management > Groups, if so, this is the expected result. What you can do is to get the user/s in your Approvers user picker and add it in the request body like

  "to": {
    "reporter": true,
    "assignee": false,
    "users": [
      {
        "name": "userOne"
      }
    ]
  }

In your second scenario

One way you can do this is by calling Search for issues using JQL REST API where the jql is something like issuetype = myIssueType and it will return you all the issues of the said issue type. If you need issues created on specific dates, you can add something like created >= 2019-06-24 AND created <= 2019-06-26.

Hope this helps.
Ian