Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create issue via the API with email address set as reporter

Jarosław Kaczmarek
Contributor
July 22, 2022

Hi
So we have a third-party integration that will help our customers create tickets in specific conditions. It works but its only problem is that instead of putting the client as the reporter, it puts the API user as the reporter of an issue.

It produces the following error:

image (45).png

Additional details:

  1. The reporter is already an existing customer
  2. The reporter is putting his email address in the integration
  3. The email address is being passed over via the API to JSM
  4. Reporter is a field visible and editable on the create screen
  5. Integration calls https://xtm-cloud.atlassian.net/rest/api/3/issue to perform the operation. The method is hardcoded in the integration.

    Here is part of the API call:
    {
        "qs": {},
        "body": {
            "fields": {
                "project": {
                    "id": "11301"
                },
                "summary": "Upgrade request of Damian hehe ziolko",
                "priority": {
                    "id": "10000"
                },
                "reporter": {
                    "id": "damian.rusicki@gmail.com"
                },
                "description": {
                    "type": "doc",
                    "version": 1,
                    "content": [
                        {
                            "type": "paragraph",
                            "content": [
                                {
                                    "type": "text",
                                    "text": "Instance URL: login.cloud.xtm"
    I assume the method is not able to map the email to the existing user ID.

The minimum I would like to achieve is:

  1. Put the reporter email in a custom field (can be done, already tested)
  2. Run automation that will take email from that custom field and then update the reporter field accordingly. It needs to be universal automation (i.e. I can't predict who from 5000 customers will send the request)

The maximum:

  1. Reporter from the get-go is properly set

Any suggestion would be most welcome and appreciated. 

3 answers

1 accepted

1 vote
Answer accepted
Stefan Salzl
Community Champion
July 25, 2022

Hi @Jarosław Kaczmarek 

the user fields (like reporter, assignee,...) need the user´s accountID to be filled with. Therefore I would suggest to fire another API call (before the create issue) to retrieve the accountID via the user´s email.

Best
Stefan

1 vote
Dhiren Notani_Exalate_
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.
July 25, 2022

Hi @Jarosław Kaczmarek 

This is Dhiren from Exalate.

Exalate, provides a fully bi-directional synchronization between Jira and Jira (among other ITSM systems) that is fully customizable. It is easy to set up and Exalate uses a scripting engine which is based on Groovy scripts where you can control what data you want to share and even you can independently handle the incoming information. You can achieve complex use-cases with ease. 

We can specify and set a default value for Reporter via the synchronization using the Script mode.

If you would like to see a customized demo of the product in action, feel free to book a slot with us. 

Thanks
Dhiren

0 votes
Diana_Architect_ZigiWave
Atlassian Partner
July 26, 2022

@Jarosław KaczmarekHi there! Unfortunately, such issues do happen (occasionally) with the mappings. I'd like to propose an alternative solution to the one you already use. It has advanced field mappings options, and you can customize it to fit any use case or scenario - you can choose which fields to populate with data and which not (custom or default ones) and tweak the report the way you want. It's called ZigiOps. Feel free to check it and book a demo to see how it can help you.


Regards, Diana (ZigiWave)

Suggest an answer

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

Atlassian Community Events