Configuration Query#3

1. When user select Urgent priority JIRA system should auto select Due Date to current. How to achieve this?

2. Mail system is very slow in response. For all the events in JIRA system. How can we improve speed?

3. Unable add swarner user account to Administrator, Developers group and to assign Project Roles.

Getting below error

Errors

• You cannot add user 'swarner' to group 'jira-administrators'. The user's directory is read only.

1 answer

Hi Venugopal,

1. When user select Urgent priority JIRA system should auto select Due Date to current. How to achieve this?

You can use the groovy script to set the Due Date for an issue based on the Priority value. Please try the below script by adding it as a post function on Create Issue step of your workflow. Hope it works!

import java.sql.Timestamp 
import com.atlassian.jira.issue.MutableIssue 


private static final double BLOCKER = 0; 
private static final double CRITICAL = 1; 
private static final double MAJOR = 3; 
private static final double MINOR = 14; 
private static final double Trivial = 30; 



private GregorianCalendar getDate(double roll){ 
        Calendar cal = Calendar.getInstance(); 
        cal.setFirstDayOfWeek(Calendar.MONDAY); 
        cal.set(Calendar.HOUR_OF_DAY,0); 
        cal.set(Calendar.MINUTE,0); 
        cal.set(Calendar.SECOND,0); 
        cal.set(Calendar.MILLISECOND,0); 
  
        for (int x=0;x<roll;x++){ 
                cal.add(Calendar.DAY_OF_MONTH,1); 
        } 
  
        return cal; 
} 


  
MutableIssue mutableIssue = (MutableIssue) issue; 
def priority = mutableIssue.getPriority().getString("name"); 
def setDueDate = mutableIssue.getDueDate(); 
if(!(setDueDate)){ //only set the dueDate if the date isn't already set (i.e. if it == null). 
  
        GregorianCalendar cal; 
  
        if(priority.equals("Blocker")){ 
                cal = getDate(BLOCKER); 
        } else if(priority.equals("Critical")){ 
                cal = getDate(CRITICAL); 
        } else if(priority.equals("Major")){ 
                cal = getDate(MAJOR); 
        } else if(priority.equals("Minor")){ 
                cal = getDate(MINOR); 
        } else if(priority.equals("Trivial")){ 
                cal = getDate(TRIVIAL); 
        } 
        Timestamp dueDate = new Timestamp(cal.getTimeInMillis()); 
        mutableIssue.getPriorityObject(); 
        mutableIssue.setDueDate(dueDate); 
}

2. Mail system is very slow in response. For all the events in JIRA system. How can we improve speed?

You can check with the JIRA logs and SMTP logs under your <JIRA_HOME>/log/atlassian-jira.log directory and <INSTALL_JIRA>/logs/catalina.out directory to get some useful hints

3. Unable add swarner user account to Administrator, Developers group and to assign Project Roles.

It seems that the groups in the LDAP are readonly. Please go through the resolution provided in this Knowledge Base

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 7 hours ago in Agile

What is ChatOps? A guide to its evolution, adoption, and significance

I am the product of AIM. I can hear that door swinging open and closed in my mind with absolute fidelity. I’d recognize that ding anywhere. At 15, as I typed away into AOL IM, I never imagined that ...

22 views 1 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you