We have an existing project that uses Jira SKD to get card info from Jira board and it has been developed by another developer. Recently we faced an exception while working with it as follows:
Method not found: 'Void RestSharp.Parameter..ctor(System.String, System.Object, RestSharp.ParameterType
Here’s the code snippet where we encounter it:
public async Task<IEnumerable<JiraIssue>> GetAll()
{
var issues = new List<JiraIssue>();
await ForEachIssue(_jiraClient, (issue) =>
{
issues.Add(new JiraIssue
{
IssueId = issue.Key.Value,
Summary = issue.Summary,
ReQLogicProject = issue.CustomFields.FirstOrDefault(x => x.Id == ReqLogicProjectKey)?.Values.FirstOrDefault(),
ReQLogicCostCategory = issue.CustomFields.FirstOrDefault(x => x.Id == ReqLogicCostCategoryKey)?.Values.FirstOrDefault(),
Rank = issue.CustomFields.FirstOrDefault(x => x.Id == RankKey)?.Values.FirstOrDefault(),
Status = issue.Status?.Name
});
});
return issues.OrderBy(x => x.Rank);
}
private static async Task ForEachIssue(Jira jira, Action<Issue> action)
{
const int itemsPerPage = 100;
var startAt = 0;
while (true)
{
//This is where we get the exception, in the **GetIssuesFromJqlAsync** method
var result = await jira.Issues.GetIssuesFromJqlAsync($"(project = EXP or project = DBD) and issuetype in(Bug,Story,Task) and status in ("To Do", "In Progress", "Done", "DB Dev Progress") and sprint in openSprints() ORDER BY RANK", itemsPerPage, startAt);
if (!result.Any())
break;
foreach (var issue in result)
{
action(issue);
}
startAt += itemsPerPage;
}
}
We aren’t sure what to do in this regard, shall we reinstall or what specific version required to be used, no idea at the moment. It worked previously and suddenly get the exception. Is there any specific solution to this that we can resolve the issue?
N.B: We use RestSharp version 106.15.0 and Atlassian SDK version 12.4.0.