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

This widget could not be displayed.

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
Community showcase
Posted 5 hours ago in Featured Groups

Hi! I'm Cameron Deatsch, Head of Server at Atlassian and I'm hosting an AMA next week.

Hey team! I'm Cameron Deatsch, Head of Server at Atlassian. I'll be hosting an AMA over in our Questions section of the Community next Monday, so shoot me your questions, upvote others' question...

23 views 0 2
View post

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