============================================ openpyxl-redmine workflow operation examples ============================================ Overview -------- Cut-and-paste examples of common operations with workflows are given. Moving a project from Open to New and assigning tasks ----------------------------------------------------- :: !!! in the right Redmine project folder ? $ pmo-workflow $API_key workflow_in_redmine Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks 87186 PMO project "DP002" 87171 PMO_project "DP005" 87142 PMO project "DP012" 87679 PMO project "DP016" - prelimnary 87103 PMO project "DP014" 87698 PMO project "DP025" - preliminary 87116 PMO project "DP022" 87617 PMO project "DP027" 87074 PMO project "DP024" 86903 PMO project "DP021" !!! extract the Table view, there's no need to keep the Table locally! $ pmo-workflow $API_key workflow_extract playground/DP027.xlsx 87617 Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks !!! edit that table $ libreopen playground/DP027.xlsx .. figure:: pyxlred_workflow_operation_1a.png :width: 1000 :alt: Example's edit and save Table Example's edit and save Table :: $ pmo-workflow $API_key workflow_validate playground/DP027.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks row 4 col Assignee WARNING using best fit for assignee Wrona best 3 were: [('Krzysztof Wrona', 90), ('Agnieszka Wrona', 90), ('Weronika Glowadzka', 72)] row 4 col Assignee ERROR assignee replaced Krzysztof Wrona row 5 col Assignee WARNING using best fit for assignee Wrona best 3 were: [('Krzysztof Wrona', 90), ('Agnieszka Wrona', 90), ('Weronika Glowadzka', 72)] row 5 col Assignee ERROR assignee replaced Krzysztof Wrona row 9 col Assignee WARNING using best fit for assignee Wrona best 3 were: [('Krzysztof Wrona', 90), ('Agnieszka Wrona', 90), ('Weronika Glowadzka', 72)] row 9 col Assignee ERROR assignee replaced Krzysztof Wrona row 10 col Assignee WARNING using best fit for assignee Wrona best 3 were: [('Krzysztof Wrona', 90), ('Agnieszka Wrona', 90), ('Weronika Glowadzka', 72)] row 10 col Assignee ERROR assignee replaced Krzysztof Wrona .. figure:: pyxlred_workflow_operation_1b.png :width: 1000 :alt: Example's validate injected finanl names Example's validate injected names are correct :: $ pmo-workflow $API_key workflow_preview playground/DP027.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks Move 87617 from Open to New path ['Open', 'Under Review', 'New'] Move 87618 from Open to New path ['Open', 'Under Review', 'New'] Move 87619 from Open to New path ['Open', 'Under Review', 'New'] Assign 87619 from None to Krzysztof Wrona Move 87620 from Open to New path ['Open', 'Under Review', 'New'] Assign 87620 from None to Krzysztof Wrona Move 87621 from Open to New path ['Open', 'Under Review', 'New'] Move 87622 from Open to New path ['Open', 'Under Review', 'New'] Move 87623 from Open to New path ['Open', 'Under Review', 'New'] Move 87624 from Open to New path ['Open', 'Under Review', 'New'] Assign 87624 from None to Krzysztof Wrona Move 87625 from Open to New path ['Open', 'Under Review', 'New'] Assign 87625 from None to Krzysztof Wrona Move 87626 from Open to New path ['Open', 'Under Review', 'New'] Move 87627 from Open to New path ['Open', 'Under Review', 'New'] Move 87628 from Open to New path ['Open', 'Under Review', 'New'] $ pmo-workflow $API_key workflow_push playground/DP027.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks .. figure:: pyxlred_workflow_operation_1.png :width: 1000 :alt: Example's post operation Redmine view Example's post operation Redmine view pull, change table, preview, validate, push ------------------------------------------- This is NOT sensible and the exit(status) are incorrect - work required: :: $ pmo-workflow $API_key workflow_preview playground/DP014.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks row 4 col Assignee WARNING using best fit for assignee hauf best 3 were: [('Steffen Hauf', 90), ('Sandor Brockhauser', 68), ('Britta Weinhausen', 68)] row 4 col Assignee ERROR assignee replaced Steffen Hauf $ libreoffice playground/DP014.xlsx $ pmo-workflow $API_key workflow_push playground/DP014.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks row 4 col Assignee WARNING using best fit for assignee hauf best 3 were: [('Steffen Hauf', 90), ('Sandor Brockhauser', 68), ('Britta Weinhausen', 68)] row 4 col Assignee ERROR assignee replaced Steffen Hauf $ libreoffice playground/DP014.xlsx $ echo $? 0 $ # hauf to Steffen Hauf NOT updated in DP014.xlsx, but exit(status) is incorrect should be 1 ^C $ pmo-workflow $API_key workflow_validate playground/DP014.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks row 4 col Assignee WARNING using best fit for assignee hauf best 3 were: [('Steffen Hauf', 90), ('Sandor Brockhauser', 68), ('Britta Weinhausen', 68)] row 4 col Assignee ERROR assignee replaced Steffen Hauf $ echo $? 1 $ libreoffice playground/DP014.xlsx $ # hauf to Steffen Hauf IS updated in DP014.xlsx ^C $ pmo-workflow $API_key workflow_preview playground/DP014.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks Assign 87105 from None to Steffen Hauf $ pmo-workflow $API_key workflow_push playground/DP014.xlsx Caching Redmine Tasks - Wait! Redmine Caching Finished - 179 Tasks Assign 87105 to Steffen Hauf redmine ID 261 assign returned: True $ echo $? 0 Creating a sub-project for a workflow ------------------------------------- Reasons for adding a workflow specific sub-project are: * additional tasks are needed to detail a workflow task To add a sub-project to workflow *PMO project "DP005 SQS DSSC"* * open the anchor task in the browser * in the *more* pull-down menu click *create a project* * set sub-project identifier, following the hyphenated lowercase pattern show, and the tracker and custom-field tick-boxes shown. .. figure:: pyxlred_workflow_sub_project_options.png :height: 500 :alt: Example workflow sub-project configuration Example create workflow sub-project configuration .. note:: There are at least two ways of creating a sub-project 1) *create a project* in a parent project task 2) *New sub-project* in the parent project's settings. The result is identical! .. note:: The *Move* option in a task's *More* pull-down allows changing a sub-task's parent, which is useful tool to re-populate tasks in different projects. Setting a sub-project HoldingTickets to parent workflows -------------------------------------------------------- To associate a project task, e.g. 89714, blocked by a sub-project task, e.g. 90314, set the relationship: :: $ etest-enquire $API_key set_relationship 89714 90134 'blocked' 0