Forums

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

Changing the order of the statuses in the dropdown list in an issue

Or Go
Contributor
August 18, 2020

Hi all,

When I click on the Status button in an issue,

The order of the statuses in the dropdown is not representing the correct workflow order,

Is there a way to control it?

I found a post regarding this matter but didn't really understand what I need to do in-order to place the statuses in the order I need it to be.

Any help would be very much appreciated.

Thanks   

 

1 answer

0 votes
Wim Deblauwe
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.
December 9, 2013

I just tested it and I can confirm it is an issue. Support for this is done through implementing the CustomFieldStattable interface. I have it currently like this:

public StatisticsMapper getStatisticsMapper(CustomField customField)
	{
		return new AbstractCustomFieldStatisticsMapper(customField)
		{
			@Override
			protected String getSearchValue(Object o)
			{
				if( o == null )
				{
					return null;
				}
				else
				{
					return ((IdAndString) o).getId();
				}
			}

			public Object getValueFromLuceneField(String id)
			{
				// Convert the primary key into something nice
				if( id != null )
				{
					String text = DatabaseValuesViewHelper.getViewHelper(customField).getTextForStatistics(id, getDescriptor().getI18nBean());
					return new IdAndString(id, text);
				}
				else
				{
					return null;
				}
			}

			@Override
			public Comparator getComparator()
			{
				return new Comparator()
				{
					public int compare(Object o1, Object o2)
					{
						if (o1 == null && o2 == null)
						{
							return 0;
						}
						else if (o1 == null)
						{
							return 1;
						}
						else if (o2 == null)
						{
							return -1;
						}
						return ((IdAndString) o1).getText().compareTo(((IdAndString) o2).getText());

					}
				};
			}
		};
	}

I don't know what I do wrong to support the 'none' hyperlink case?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events