Skip to content

Commit

Permalink
🔧 varible/parameter naming fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hraško committed Jan 29, 2024
1 parent c2a895e commit 7b5285d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions jwl.jira/IJiraServerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public interface IJiraServerApi

Task<WorkLog[]> GetIssueWorklogs(DateOnly from, DateOnly to, IEnumerable<string>? issueKeys);

Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment);
Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? activity, string? comment);

Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? tempoWorklogType, string? comment, bool includeNonWorkingDays = false);
Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? activity, string? comment, bool includeNonWorkingDays = false);

Task DeleteWorklog(long issueId, long worklogId, bool notifyUsers = false);

Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment);
Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? activity, string? comment);
}
6 changes: 3 additions & 3 deletions jwl.jira/JiraWithICTimePluginApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public Task<WorkLog[]> GetIssueWorklogs(DateOnly from, DateOnly to, IEnumerable<
throw new NotImplementedException();
}

public Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
throw new NotImplementedException();
}

public Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? tempoWorklogType, string? comment, bool includeNonWorkingDays = false)
public Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? activity, string? comment, bool includeNonWorkingDays = false)
{
throw new NotImplementedException();
}
Expand All @@ -47,7 +47,7 @@ public Task DeleteWorklog(long issueId, long worklogId, bool notifyUsers = false
throw new NotImplementedException();
}

public Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
throw new NotImplementedException();
}
Expand Down
12 changes: 6 additions & 6 deletions jwl.jira/JiraWithTempoPluginApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public async Task<WorkLog[]> GetIssueWorklogs(DateOnly from, DateOnly to, IEnume
return result;
}

public async Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public async Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
await AddWorklogPeriod(issueKey, day, day, timeSpentSeconds, worklogType, comment);
await AddWorklogPeriod(issueKey, day, day, timeSpentSeconds, activity, comment);
}

public async Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? tempoWorklogType, string? comment, bool includeNonWorkingDays = false)
Expand Down Expand Up @@ -129,12 +129,12 @@ public async Task DeleteWorklog(long issueId, long worklogId, bool notifyUsers =
await _httpClient.DeleteAsync(uriBuilder.Uri.PathAndQuery);
}

public async Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public async Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
await UpdateWorklogPeriod(issueKey, worklogId, day, day, timeSpentSeconds, comment, worklogType);
await UpdateWorklogPeriod(issueKey, worklogId, day, day, timeSpentSeconds, comment, activity);
}

private async Task UpdateWorklogPeriod(string issueKey, long worklogId, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? comment, string? tempoWorklogType, bool includeNonWorkingDays = false)
private async Task UpdateWorklogPeriod(string issueKey, long worklogId, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? comment, string? activity, bool includeNonWorkingDays = false)
{
UriBuilder uriBuilder = new UriBuilder()
{
Expand All @@ -157,7 +157,7 @@ private async Task UpdateWorklogPeriod(string issueKey, long worklogId, DateOnly
Key = WorklogTypeAttributeKey,
Name = @"Worklog Type",
Type = api.rest.common.TempoWorklogAttributeTypeIdentifier.StaticList,
Value = tempoWorklogType
Value = activity
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions jwl.jira/VanillaJiraServerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public async Task<WorkLog[]> GetIssueWorklogs(DateOnly from, DateOnly to, IEnume
return result;
}

public async Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public async Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
UriBuilder uriBuilder = new UriBuilder()
{
Expand All @@ -97,7 +97,7 @@ public async Task AddWorklog(string issueKey, DateOnly day, int timeSpentSeconds
await _httpClient.PostAsJsonAsync(uriBuilder.Uri.PathAndQuery, request);
}

public async Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? worklogType, string? comment, bool includeNonWorkingDays = false)
public async Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly dayTo, int timeSpentSeconds, string? activity, string? comment, bool includeNonWorkingDays = false)
{
DateOnly[] daysInPeriod = Enumerable.Range(0, dayFrom.NumberOfDaysTo(dayTo))
.Select(i => dayFrom.AddDays(i))
Expand All @@ -110,7 +110,7 @@ public async Task AddWorklogPeriod(string issueKey, DateOnly dayFrom, DateOnly d
int timeSpentSecondsPerSingleDay = timeSpentSeconds / daysInPeriod.Length;

Task[] addWorklogTasks = daysInPeriod
.Select(day => AddWorklog(issueKey, day, timeSpentSecondsPerSingleDay, worklogType, comment))
.Select(day => AddWorklog(issueKey, day, timeSpentSecondsPerSingleDay, activity, comment))
.ToArray();

await Task.WhenAll(addWorklogTasks);
Expand All @@ -130,7 +130,7 @@ public async Task DeleteWorklog(long issueId, long worklogId, bool notifyUsers =
await _httpClient.DeleteAsync(uriBuilder.Uri.PathAndQuery);
}

public async Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? worklogType, string? comment)
public async Task UpdateWorklog(string issueKey, long worklogId, DateOnly day, int timeSpentSeconds, string? activity, string? comment)
{
UriBuilder uriBuilder = new UriBuilder()
{
Expand Down

0 comments on commit 7b5285d

Please sign in to comment.