Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

issue.Savechange() throw unknown exception after setting issue priority value. Edited

Hi, guys

The .NET program I used to create Jira issues automatically fails to save the new created issue. But I can create and save a issue manually when I log in Jira in browser. See the attached pics for exception details. What causes this exception? thanks.

JiraException.jpgJira.JPGJira2.JPGJira3.JPG

1 answer

0 votes

This is something broken in whatever library or application you are using to talk to Jira with.  You'll need to fix your code such that it makes a valid call.  You've not told us what you're using, so we can't tell you much more than that.

The code was working perfectly until April 20, so I guess there was something changed on Jira server side that causes this issue. 

 

 

Atlassian.NET SDK 12.4.0

Jira.JPG

 

Hi

 

The problem is resolved after removing following code, weird.

new_issue.Priority = "None";

 

Should I use priority id instead?

 

How should I know which id to represent the values in the drop list:

None, Highest, High, Medium, Low, Lowest.

It's usually the id you need.  I think you should have a look at the project though, the "change" might be that someone removed priority or changed the priority scheme.

No priority usually means "nothing selected, field is empty" though, which is usually a null, or not sending anything at all.

I tried following two ways to set priority, but they all triggers that exception.

So, what is the correct way to do it in .net code? Thanks.

 

// set priority based on CVSS score
//1 = Highest 2 = High 3 = Medium 4 = Low 5 = Lowest 6 = (not used) 7 = None
if (score <= 0.0)
new_issue.Priority = "7";
else if (score >= 7.0)
new_issue.Priority = "2" ;
else if (score <= 4.0)
new_issue.Priority = "4";
else
new_issue.Priority = "3";

new_issue.SaveChanges();

 

// set priority based on CVSS score
if (score <= 0.0)
new_issue.Priority = "None";
else if (score >= 7.0)
new_issue.Priority = "High";
else if (score <= 4.0)
new_issue.Priority = "Low";
else
new_issue.Priority = "Medium";
new_issue.SaveChanges();

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you