Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is an X-Priority?

The X-Priority is used to indicate the importance of a message. Microsoft

...

...

with 1

...

being the highest

...

and 5 the lowest.

There is a default Priority Scheme for all Projects that don’t have a defined Priority Scheme set. It has the default 5 priority levels from 1-5. However, Priorities and Priority Schemes can be created and applied to a given Project. A created Priority Scheme can contain any amount of priorities starting from 1.

Due to a Priority Scheme potentially holding more than 5 Priorities matching the 5 Priority levels that Microsoft allows, JEMH has to make changes to decide which Priority should be used for a message.

How JEMH works with X-Priorities:

JEMH finds the correct X-Priority Header that should be used by finding out how many total Priorities there are in the Priority Scheme being used before calculating the weight of each Priority.

For example, if there are 10 Priorities, each Priority has a weight value of 5/10 or 0.5/5.

From this, we will then incrementally go through each Priorities weight value until it is greater than or equal to the desired priority value.

For example, if there are 10 priorities, each has a weight value of 0.5 and we want the X-Priority of 4. The result priority used will be Priority 8 as 8 x 0.5 >= 4 is the first true result.

Notes:

  • If the user selects chooses an X-Priority that is less than 1, the highest Priority that is available will be used.

  • If the user selects chooses an X-Priority that is greater than 5 and it is not the id of another Priority within the Priority Scheme being used, the lowest Priority that is available will be used.

Using specific created Priority by its ID:

If you set the X-Priority to be the id of Priority that has been added to the Priority Scheme, that has an id greater than 5, this Priority will automatically be used.

Example Table of Priorities and Table of Results depending on which X-Priority has been chosen:

Table of Priorities - example Priority Scheme:

...

Priority

...

Priority ID

...

1

...

1

...

2

...

2

...

3

...

3

...

4

...

4

...

5

...

5

...

custom6

...

10000

...

custom7

...

10001

...

custom8

...

10002

...

custom9

...

10003

...

custom10

...

10004

Table of Results - related to Table of Priorities above:

...

Chosen Priority

...

Result Priority

...

1

...

1

...

2

...

3

...

3

...

custom6

...

4

...

custom8

...

5

...

custom10

...

10000

...

custom6

...

10001

...

custom7

...

10002

...

custom8

...

10003

...

custom9

...

10004

...

custom10

...

-20

...

1

...

2000000

...

custom10

Enabling X-Priority Headers:

In order for X-Priority Headers to work, you are required to first enable this, you can do this by going to:

Profiles > Profile Configuration > Issue

Then ensure that the Use Mail X-Header Priority check box is ticked.

You can see how the screen looks like below where you need to do this:

...

Example use of implementation:

Below is a Test Case where we are entering that we want to use the lowest available X-Priority by setting the value to be 5. You can see that the Project being used is “context testing“.

...

You can see below that there are 3 different Priority Schemes, however, the Project that is being used, “context testing”, is not associated to any Priority Scheme and therefore will use the default.

...

Below is the result from running the Test Case, where the resulting message Priority has been set to priority10. This is the case as you can see from the Default Priority Scheme above, that priority10 is the lowest Priority available and in the Test Case, we set the X-Priority to be 5 and therefore the lowest Priority available.

...

Example Case Results:

Case with 1 - will always pick the highest Priority available:

...

Number of Priorities

...

Chosen Priority

...

Result Priority

...

1

...

1

...

1

...

2

...

1

...

1

...

3

...

1

...

1

...

4

...

1

...

1

...

5

...

1

...

1

...

6

...

1

...

1

...

7

...

1

...

1

...

8

...

1

...

1

...

9

...

1

...

1

...

10

...

1

...

1

Case with 5 - will always pick the lowest Priority available:

...

Number of Priorities

...

Chosen Priority

...

Result Priority

...

1

...

5

...

1

...

2

...

5

...

2

...

3

...

5

...

3

...

4

...

5

...

4

...

5

...

5

...

5

...

6

...

5

...

6

...

7

...

5

...

7

...

8

...

5

...

8

...

9

...

5

...

9

...

10

...

5

...

10

...

When enabled through Profile > Issue > Use Mail X-Priority Priority, JEMH will map this to an actual Priority defined in the Project Priority Scheme.

How JEMH works with X-Priority header

Status
colourGreen
titleSince 3.3.111 & 4.0.4

Starting in the above versions, JEMH will make use of the priorities set on a per project basis through a Priority Scheme. As the number of Project Priorities can be any number, the 5 X-Priorities map into the set of available Jira priorities. We have ensured that an X-Priority value of 1 always maps to the highest Jira priority and 5 always maps to the lowest Jira priority. Values 2-4 will spread between the highest and lowest priority depending on how many there are. If the value supplied has been deliberately set above 1-5, it will be tested for an exact match on a Jira priority ID, non-matches are treated as lowest priority.

How X-Priority values map to Jira priorities

The tables below show how X-Priority values map to project priorities. The selected index indicates the target priority from the available project priorities (1 = first/highest).

X-Priority = 1

Project Priorities

Selected Index

1

1

2

1

3

1

4

1

5

1

6

1

7

1

8

1

9

1

10

1

X-Priority = 2

Project Priorities

Selected Index

1

1

2

1

3

1

4

1

5

2

6

2

7

2

8

2

9

2

10

3

X-Priority = 3

Project Priorities

Selected Index

1

1

2

2

3

2

4

3

5

3

6

4

7

5

8

5

9

6

10

6

X-Priority = 4

Project Priorities

Selected Index

1

1

2

2

3

3

4

4

5

4

6

5

7

6

8

7

9

8

10

8

X-Priority = 5

Number of Priorities

Chosen Priority

Result Priority

1

...

5

1

2

...

5

2

3

5

3

4

...

5

4

...

5

...

5

5

...

6

...

5

6

...

7

...

5

7

...

8

5

8

...

9

5

9

...

10

...

5

10

...

3

...