Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Set up different mail address for notifications of a user when Jira is in front of a corporate LDAP

How to update the status of jira ticket from jenkins build(manual build)

prabha vk
November 15, 2020

How to update the status of jira ticket from Jenkins build(manual build)

> i need to update the status of jira ticket as per the Jenkin job 

> current status is "ready for staging deployment"

> it should move to "deployed on staging" after the triggering build from jenkins 

 

jiraAddComment idOrKey: 'MSDP-198', input: comment, site: 'JIRA'

jiraJqlSearch jql: 'issue = MSDP-198 'AND' status in (READY FOR STAGING DEPLOYMENT, DEPLOYED ON STAGING)', site: 'JIRA'

 

is this correct ? i am trying from jenkinsfile

Please suggest.

6 answers

0 votes
Franklin Cadre
August 5, 2019

Hello, 

As the topic is quite old now, does anyone know if there is an easier way to tackle this issue?

Thank you :) 

0 votes
Alex Perez
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 25, 2013

Mmmm ... it's a bit crappy but here I go:

-In the LDAP server: define a custom attribute for the affected users and store his secondary email in it. Then define a LDAP group including all ldap-users that should be notified to this secondary email. Let's call this group: [secondary-email-group]

-In Jira, duplicate the directory definition. Both directories are the same ldap-server but in the first one add a "User Object Filter" condition to prevent users belonging to [secondary-email-group] group to login. In the second directory, change the email mapping to use the custom attribute as email.

This way, users in the XX group will login by using the second directory (which is the same server but with different email-attribute mapping).

HTH

0 votes
Deleted user
April 11, 2013

Its not clear what scenario determines the address needs to be rewritten. Is it always or when X=Y (if so what)?

Bottom line, if you are OK for userX to receive a copy to the default email address, you need a customized IssueEventListener to do this. The custom IssueListener could then say 'aha' I have userX, and create a new notification for the subsitute address.

If you want to stop the notification to the first address that becomes more complex but is still doable.

0 votes
Aspect Infra Team
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.
April 11, 2013

yes this is not a best idea, and will have some support cost ( you will need to manage two mail fields per user instead of one ) but it's easy realised - for beginning just copy current AD e-mail to this new field, and then change this field only for users who need change. but i hope users won't change jira notifications e-mail often?

0 votes
Felix Herzog
April 11, 2013

Thanks, but this is not possible for individual accounts, correct? Like: for User 'felix1' use 'jiramail' attribute... This is only configurable for the whole system, right?

0 votes
Aspect Infra Team
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.
April 11, 2013

jira allows to link mail to any ldap attribute, so you can create some "alternatemail" and link jira email to it in ldap connector

Suggest an answer

Log in or Sign up to answer