Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA automation smart value for project lead - issue.project.lead - is null

I am just getting started using JIRA automation for JIRA Premium in the cloud.

I would like to be able to automatically set the assignee for an issue upon specific transition to the project lead and to email that project lead.

However, looking at the smartvalue for {{issue.project.lead}} in a debug rule I set up, those values are null, even though my project has a lead set (me for my test project) and they have email addresses set up in their profile.  (of course all projects have it as a required field).

Any help?  I'd like to be able to access who is the project lead for any issue and be able to assign them, email them and possibly tag them in a new comment, set them as a watcher etc, in different circumstances/rules that I may make.

2 answers

1 accepted

0 votes
Answer accepted

Hi @Kyle Quevillon @Kian Stack Mumo Systems 

I can also confirm that {{issue.project.lead}} is indeed null.

If this is blocking you then while Atlassian fixes it may be use this method to get the lead using REST API.

Send a web request.

JIRAURL/rest/api/3/project/{{issue.project.key}}

Make sure to check "Delay execution of subsequent rule actions until we've received a response for this webhook".

Then in the next component you can access lead information using:

 {{webhookResponse.body.lead.displayName}}

Not ideal way of doing it but I thought it might be useful.

Ravi

0 votes

@Kyle Quevillon

I'm seeing similar behavior. I set up an automation rule to pull the value from project lead and cannot get it to work either. When I did a bit of digging,  I found out that when you use the smart value {{issue.project}} it's pulling a JSON-like object that looks like this:


Project{
self='https://jiraservicemtesting.atlassian.net/rest/api/2/project/10012',
id=10012, key='SP',
name='Software Project',
description='null',
avatarUrls={48x48=https://jiraservicemtesting.atlassian.net/secure/projectavatar?pid=10012&avatarId=10419, 24x24=https://jiraservicemtesting.atlassian.net/secure/projectavatar?size=small&s=small&pid=10012&avatarId=10419, 16x16=https://jiraservicemtesting.atlassian.net/secure/projectavatar?size=xsmall&s=xsmall&pid=10012&avatarId=10419, 32x32=https://jiraservicemtesting.atlassian.net/secure/projectavatar?size=medium&s=medium&pid=10012&avatarId=10419},
issuetypes=null,
projectCategory=null,
email='null',
lead=null,
components=null,
versions=null,
projectTypeKey='software',
simplified='false'}

 

What's odd about this is that I have a lead for the project, and I've set a description. It appears that the object they are returning for "Project" may not be keeping up to date. I don't know if this is a "bug" as I actually can't find any references to using the project object in Atlassian's documentation, but it certainly seems like it should be working and it isn't.

@Kian Stack Mumo Systems exactly what I am seeing when I dump the project object.
I have seen another post out there where someone asks how to get the project lead's email address in order to send them an email and the suggestion is to use {{issue.project.lead.emailAddress}} and I believe they said that worked for them, but I don't know how it could is the lead property is null.

@Kyle Quevillon, the documentation for the server version of Automation for Jira explicitly references the project object, so it's possible that the server version supports it and the cloud does not... That being said, the fact that I can access it makes me think that it IS supported and just not functioning correctly.

I would log a bug with Atlassian support if I were you, and tell them that the project object is not returning the correct data.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you