Ejemplo n.º 1
0
def issues(days_ago):
    """Migrate non-synchronized tickets from SK to PUB since from DAYS_AGO till NOW
    \b

    Finds non-synchronized tickets by using worklogs and assigned tasks in SK for current user.
    Provides git-like interface to choose which tickets have to be migrated.
    After that, it uses `issue` command for each of a task.

    Can synchronize maximum 1000 days.
    """
    sk, pub = JiraFactory.create()

    if days_ago and 1 < days_ago < 1000:
        started = day_ago_to_datetime(days_ago)
    else:
        started = IO.input_days_ago(default=14, limit=1000)

    IssueSync(sk, pub).migrate_issues(started)
Ejemplo n.º 2
0
def time(days_ago):
    """Time synchronization between JIRAs from DAYS_AGO till NOW

    Finds existing worklogs in SK and PUB JIRA.
    Compares them by using `External ID`.
    Migrates all worklogs from PUB to SK if time differences exists.
    Uses PUB as a primary source.
    Migrates comments for worklogs as well.

    Can synchronize maximum 100 days.
    """
    sk, pub = JiraFactory.create()

    if days_ago and 1 <= days_ago < 100:
        started = day_ago_to_datetime(days_ago)
    else:
        started = IO.input_days_ago(default=5, limit=100)

    TimeSynchronizer(sk, pub).do(started)