Forums

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

Change Reporter using Automation

Anthony Polakos
Contributor
February 11, 2019

Overview

I'm using a Jira Cloud app (Relay Intake Forms) to create rich external forms to submit to my Service Desk. 

Issue

One of the downsides of that app seems to be no field mapping for reporter. So all issues created via the form are from a single app-created user. 

I obviously want my users to be able to access the issues they created, so I need to change the Reporter to who is actually submitting these forms.

Failed Resolution

I created a custom field for "user email".  I'd like to create an automation that upon issue creation, changes the reporter to the contents of the custom field "user email".

I'm not too hip to the exact code I should be using (or if this is even possible).

Here's what I tried under advanced:

{
"fields": {
"reporter": {
"emailAddress": "{{customfield_116130}}"
}
}
}

 

How far off base am I?  🙂

 

Here's my automation, I have a precondition that first adds the customfield for the username and email address as a customer to Jira Service Desk (this part works!). 

Then it checks if  the reporter is the "system defined user" from the other app I use for user forms.  If it is, then change the user to the customfield for emailaddress.

I've tried various ways of inserting the reporter (email address, name, key) and none have worked.  It currently is successful on editing the issue field and changing the reporter, but the reporter now shows as "Anonymous" in the issue..

 

Screen Shot 2019-02-13 at 4.02.59 PM.png

 

 

3 answers

0 votes
Xavier Morera
June 11, 2013

Hi. This may not be the ultimate solution but it is a workaround that could be implemented in 5 minutes:

- Download this plugin https://marketplace.atlassian.com/plugins/com.marketingquantum.quantum

- Use the normal "Log Work" feature

- When entering the description just use a keyword at the beginning for sorting, i.e. "Step 1:"

- When you get the report using the plugin, just sort by issue first and step second. Easy solution that provides you with what you need with just a bit of discipline.

0 votes
Viðar Svansson [Tempo]
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 Champions.
June 11, 2013

Hi Josh,

You might be able to achive what you want with Tempo Timesheets but it would maybe not be as automatic as you would like.

You could set up a Dynamic Dropdown Worklog Attribute to the Log Work screen. The dropdown could be populated by a REST service that returns the available workflow state for the issue and even setting current state as the selected value. This might require you to build a small JIRA plugin that exposes the REST endpoint.

Unfortunately the Tempo Log Work screen is not yet available on an issue transition so it requires some training.

Cheers,
Viðar

0 votes
Andreas K.
Contributor
June 10, 2013

Hi Josh,
How do you consume the information today? Are you simply using the Jira UI to look at the data or are you using some kind of reporting?

I am not sure if this replies to your answer, but my approach in the past for this scenario was to use simply SQL and tap into the database. Jira keeps a history of all the status changes and when they occur. So via SQL it is possible to get to what you want. To expand a bit, I use MS SQL Server Express Edition with Advanced Services (Free Edition) to do the querying and the reporting.

But maybe there are other solutions available that I do not know of :-)
Cheers!

Suggest an answer

Log in or Sign up to answer