AppleScript: Custom WBS-Codes

AppleScriptIn the Merlin German user forum  in Google groups* a user asked, how to define WBS codes for all activities like 1.1.1… but have milestones coded by a leading M (so for example M.1.1.1)

Well, Merlin users know how to define WBS coding schemes. They simply call File >WBS Code Definition… and define a prefix or counters as desired. But such an action would apply the same numbering scheme for all activities and milestones. So how to proceed in meeting the requirements of this specific user? The answer can be, either renagotiate the WBS coding or try an AppleScript approach..

If you can spare one of the three columns (Subtitle, Additional tittle or Notes) just use the following Applescript writing in one of these columns the WBS code of the tasks in the desired manner. So…

tell application “Merlin”

 
     activate
	set myselection to selected object of main window of document 1 ¬
		as list

	if (count of myselection) is 0 then
		display dialog ¬
		"Please select the activities you would like to handle." ¬
                buttons {"OK"}
	else
		set allActivities to myselection

		repeat with act in allActivities
			if (class of act is not project) then

				if is milestone of act then
					set myWBS to "M." & WBS code of act
				else
					set myWBS to WBS code of act
				end if

			       --write in Notes
                               --set item description of act to myWBS as string
                               --in Additional Title
			       --set subtitle2 of act to myWBS as string
                               --in Subtitle
                               set subtitle of act to myWBS as string
			end if
		end repeat
	end if
end tell

_
*) BTW The forum for English speaking Merlin users can be found here

3 thoughts on “AppleScript: Custom WBS-Codes

  1. Hmm,
    My first ever attempt to use Applescript (it worked after only a few attempts). Given the emphasis on Applescript in this forum, it might be an idea to add an idiots guide in the Merlin help pages or on the forum.

    Am I right in thinking that to maintain a list of tasks numbered WP1.1, WP1.2, WP2.1 etc and also a list of Milestones M1…M9 (or deliverables D1.1…D2.5) I would have to do this programmatically within the Applescript?
    If so, any chance of this kind of functionality being added to Merlin (i.e. recognizing that deliverables and milestones should be associated with WBS units, but numbered either independently or semi-independently)?

  2. Hi J and thank you for your comment, I forward your suggestion to the management for it to be taken under consideration.

    Just to make sure I understand it correctly, while keeping Merlin’s terminology:
    It should be possible to code the WBS independently for Milestones or Activities.

    What exactly is a deliverable? Any activity group? An activity group on level 1?

    Best regards, Vicky

  3. Rather a late response to my own thread:
    A deliverable is like a milestone – it is a project event on a fixed date (or possibly at the end of a task). This terminology is in common use for the EC’s framework and Horizon 2020 research programmes which request both a Gantt chart and PERT chart in the funding proposal. The EC (European Commission) and the project’s management team then use both the deliverables and milestones to track project progress.

    I found this thread because I ran into trouble trying to persuade Merlin to use an ordering other than that of the sequence in which I entered the top-level activities to provide the WBS numbering. It would sometimes be nice to be able to refresh the activity numbering or WBS numbering to reflect the current order of activities, e.g. when setting up a project plan and changes to the sequence or groupings are made.

Comments are closed.